Skip to content

Commit

Permalink
use poetry to run pytest with coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenpawley committed Jun 1, 2024
1 parent 6d8ee87 commit b90a2c9
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,10 @@ jobs:
- name: Test with pytest
run: |
source .venv/bin/activate
pytest
- name: "Generate Report"
run : |
source .venv/bin/activate
coverage run -m pytest
poetry run pytest --cov=<project-dir> --cov-report=xml
- name: "Upload Report to Codecov"
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true # optional (default = false)
files: ./coverage1.xml,./coverage2.xml # optional
flags: unittests # optional
name: codecov-umbrella # optional
token: ${{ secrets.CODECOV_TOKEN }} # required
verbose: true # optional (default = false)
file: ./coverage.xml
fail_ci_if_error: true

0 comments on commit b90a2c9

Please sign in to comment.