diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 76ba15d..be6c87f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -64,8 +64,10 @@ jobs: - name: Store test coverage uses: actions/upload-artifact@v4 with: - name: coverage + name: coverage-data-${{ matrix.python }} path: .coverage.* + if-no-files-found: ignore + retention-days: 1 coverage: name: coverage @@ -90,7 +92,21 @@ jobs: - name: Retrieve test coverage uses: actions/download-artifact@v4 with: - name: coverage + pattern: coverage-data-* + merge-multiple: true - name: Check coverage run: tox -e coverage + + - name: + Combine coverage + run: | + python -Im coverage combine + python -Im coverage html --skip-covered --skip-empty + python -Im coverage report + echo "## Coverage summary" >> $GITHUB_STEP_SUMMARY + python -Im coverage report --format=markdown >> $GITHUB_STEP_SUMMARY + - name: 📈 Upload HTML report + uses: actions/upload-artifact@v4 + with: + name: html-report + path: htmlcov