diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index d8c531d..8994e1c 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -27,6 +27,7 @@ jobs: uses: actions/setup-python@v5.1.0 with: python-version: ${{ matrix.python-version }} + cache: 'pip' - name: Install dependencies run: | python -m pip install --upgrade pip @@ -37,7 +38,14 @@ jobs: continue-on-error: true - name: Test with pytest run: | - coverage run -m pytest -v && coverage html + coverage run -m pytest -v --junitxml=junit/test-results-${{ matrix.python-version }}.xml && coverage html + - name: Upload pytest test results + uses: actions/upload-artifact@v4 + with: + name: pytest-results-${{ matrix.python-version }} + path: junit/test-results-${{ matrix.python-version }}.xml + # Use always() to always run this step to publish test results when there are test failures + if: ${{ always() }} - name: Upload code coverage to GitHub Artifacts uses: actions/upload-artifact@v4.3.3 with: