Skip to content

Set up code coverage workflow with CodeCov #17

Set up code coverage workflow with CodeCov

Set up code coverage workflow with CodeCov #17

Workflow file for this run

on:
push:
branches: main
pull_request:
branches: main
name: test-coverage
jobs:
test-coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
- name: Install
run: |
pip install '.[dev]'
- name: pytest unit tests
run: |
make test
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
files: ./report.xml
verbose: true