From 254ed6a0a2492e4b3f44c0c1da20301fe26000d5 Mon Sep 17 00:00:00 2001 From: Cody Scott Date: Sat, 3 Feb 2024 22:01:05 -0500 Subject: [PATCH] Make coverage HTML report available on CI failure --- .github/workflows/python-package.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index f26e0e5..7afb6f1 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -34,4 +34,11 @@ jobs: - name: Tests run: | coverage run --branch -m pytest + coverage html --omit='/tmp/*' coverage report --omit='/tmp/*' --fail-under=100 + - name: Archive code coverage results + if: ${{ failure() }} + uses: actions/upload-artifact@v4 + with: + name: code-coverage-report-${{ matrix.python-version }} + path: htmlcov/