Skip to content

Commit

Permalink
Only upload coverage HTML report on failure (#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamchainz authored Dec 4, 2021
1 parent 20b2526 commit 7d70af8
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,15 @@ jobs:
with:
name: coverage-data

- name: Combine data
run: python -m coverage combine

- name: Generate HTML report
run: python -m coverage html --skip-covered --skip-empty
- name: Combine coverage and fail if it's <100%
run: |
python -m coverage combine
python -m coverage html --skip-covered --skip-empty
python -m coverage report --fail-under=100
- name: Upload HTML report
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: html-report
path: htmlcov

- name: Terminal report
run: python -m coverage report --fail-under=100

0 comments on commit 7d70af8

Please sign in to comment.