Skip to content

Commit

Permalink
Feature/improve GitHub workflow (#29)
Browse files Browse the repository at this point in the history
* Save JUnit tests and upload them

* Add pip caching
  • Loading branch information
simonkurtz-MSFT authored May 22, 2024
1 parent c50b739 commit b6a24e6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit b6a24e6

Please sign in to comment.