Skip to content

Commit

Permalink
Produce reports as pytest artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
bbrondel committed Jul 22, 2024
1 parent 13f8274 commit fb8b28c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,21 @@ jobs:
- name: Editable mode install
run: |
python -m pip install uv
uv pip install --system pytest
uv pip install --system pytest pytest-cov pytest-html
uv pip install --system -e .
- name: Test with pytest
run: |
pytest
pytest --cov=./ --coverage-report=html --html=pytest_report.html --self-contained-html
- name: Upload test report
uses: actions/upload-artifact@v4
with:
name: pytest_report
path: pytest_report.html

- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage_report
path: htmlcov

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ bin/
# Pytest
tests/.tests
pytest_session.txt
pytest_report.html
htmlcov
.cache/
.pytest_cache
.coverage
Expand Down

0 comments on commit fb8b28c

Please sign in to comment.