Skip to content

add code coverage CI job #10

add code coverage CI job

add code coverage CI job #10

Workflow file for this run

name: Code Coverage
on: [push, pull_request]
jobs:
code-coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
python setup.py install
pip install coverage
- name: Run tests and collect coverage
run: |
cd tests
coverage run --data-file=../.coverage -m unittest
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: OS,PYTHON
fail_ci_if_error: true
flags: unittests
name: codecov-umbrella
verbose: true