Skip to content

Commit

Permalink
conf: Rework code coverage config.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcass77 committed Sep 28, 2024
1 parent 95b52eb commit 5313f24
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ jobs:
run: python -m pip install --upgrade codecov tox
- name: Run tox targets for ${{ matrix.python-version }}
run: tox run -f py$(echo ${{ matrix.python-version }} | tr -d . | cut -f 1 -d '-')
- name: Upload coverage
run: |
codecov -e TOXENV,DJANGO
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
flags: unittests
env_vars: TOXENV, PYTHON, DJANGO
fail_ci_if_error: true
verbose: true
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ setenv =
PYTHONPATH = {toxinidir}
deps =
pytest
pytest-cov
pytest-django
django42: django>=4.2,<5.0
django50: django>=5.0,<5.1
django51: django>=5.1,<5.2
djangomain: https://github.com/django/django/archive/main.tar.gz
commands =
pytest
pytest --cov=./ --cov-report=xml

0 comments on commit 5313f24

Please sign in to comment.