Skip to content

Merge pull request #37 from SimeonEhrig/addCodecov #15

Merge pull request #37 from SimeonEhrig/addCodecov

Merge pull request #37 from SimeonEhrig/addCodecov #15

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 pytest pytest-cov
- name: Run tests and collect coverage
run: |
cd tests
pytest --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: OS,PYTHON
fail_ci_if_error: true
verbose: true