Skip to content

Commit 80b11bb

Browse files
ci: configure pytest reporting for consumer tracking (#136)
1 parent 2dd8433 commit 80b11bb

4 files changed

Lines changed: 367 additions & 12 deletions

File tree

.coveragerc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[run]
2+
omit = */__init__.py

.github/workflows/quality_checks.yaml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,20 @@ jobs:
3434
python -m pip install --upgrade pip poetry
3535
poetry install
3636
- name: Run unit tests
37-
run: poetry run pytest
37+
run: >
38+
poetry run pytest
39+
--json-report --json-report-file=pytest_report.json --json-report-omit collectors log streams
40+
--cov src --cov-report term --cov-report html
41+
- name: Upload reports
42+
if: always() # upload even if tests fail
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: pytest-reports-${{ matrix.python-version }}
46+
path: |
47+
htmlcov/
48+
pytest_report.json
49+
if-no-files-found: error
50+
retention-days: 14
3851

3952
run_quality_checks:
4053
runs-on: ubuntu-latest
@@ -54,7 +67,19 @@ jobs:
5467
pre-commit install --hook-type commit-msg
5568
pre-commit run -a
5669
- name: Run mypy
57-
run: MYPYPATH=src poetry run mypy --install-types --non-interactive src
70+
run: >
71+
MYPYPATH=src poetry run mypy src
72+
--install-types --non-interactive
73+
--html-report mypy-report/html
74+
- name: Upload reports
75+
if: always() # upload even if tests fail
76+
uses: actions/upload-artifact@v4
77+
with:
78+
name: mypy-report
79+
path: |
80+
mypy-report/
81+
if-no-files-found: error
82+
retention-days: 14
5883

5984
test_docs_are_building:
6085
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)