Skip to content

[CI] Update codecov action #90

[CI] Update codecov action

[CI] Update codecov action #90

Workflow file for this run

name: Tests
on:
push:
branches: [ master, dev ]
paths-ignore:
- 'docs/**'
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ${{ matrix.os }}
env:
CYTHON_LINETRACE: true
strategy:
matrix:
python-version: [3.9]
os: [macos-latest]
# exclude: # Temporarily disable release for macos and python 3.8 as there is a bug with openblas
# - os: macos-latest
# python-version: 3.8
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Add OpenMP flags (macOS)
if: runner.os == 'macOS'
run: |
brew info libomp
echo "LDFLAGS=${LDFLAGS} -L$(brew --prefix libomp)/lib" >> "$GITHUB_ENV"
echo "CPPFLAGS=${CPPFLAGS} -I$(brew --prefix libomp)/include" >> "$GITHUB_ENV"
- name: Show python info
shell: bash -e {0}
run: |
which python
python --version
- name: Build
shell: bash -e {0}
run: |
python -m pip install . -vv
- name: Install test dependencies
shell: bash -e {0}
run: |
python -m pip install -q pytest pylint pytest-pylint pytest-cov codecov pytest-mock pyteomics cython
- name: Install xvfb (Linux)
shell: bash -e {0}
run: python -m pip install pytest-xvfb
if: runner.os == 'Linux'
- name: Test with pytest
shell: bash -e {0}
run: |
cd tests
pytest --cov=libmetgem --cov-report=xml
- name: Upload coverage
if: success()
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
name: ${{ runner.os }} Python ${{ matrix.python-version }}