Skip to content

Commit

Permalink
update coverage to run as its own job
Browse files Browse the repository at this point in the history
  • Loading branch information
Dr-Blank committed Oct 22, 2023
1 parent 67964ad commit 254fde2
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,25 @@ jobs:
pip install tox tox-gh-actions
- name: Test with tox
run: tox
- name: Upload coverage reports to Codecov

coverage:
name: Coverage report
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov
- name: Run tests with coverage
run: pytest --cov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
3 changes: 1 addition & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ envlist = py{310,311}, pylint, mypy, flake8
[testenv]
deps =
pytest
pytest-cov
vcrpy
commands =
pytest --cov
pytest

[testenv:pylint]
basepython = python3.11
Expand Down

0 comments on commit 254fde2

Please sign in to comment.