Skip to content

Commit 8d46b94

Browse files
committed
ci: produce test reporting
1 parent fcfcb2a commit 8d46b94

2 files changed

Lines changed: 30 additions & 1 deletion

File tree

.github/workflows/build_and_test.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,20 @@ jobs:
7272
7373
- name: Run tests
7474
run: |
75-
uv run pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=src tests/ | tee pytest-coverage.txt
75+
uv run pytest --junitxml=pytest.xml --tb=auto --cov-report=term-missing:skip-covered --cov=src tests/ | tee pytest-coverage.txt
7676
7777
- name: Pytest Coverage Comment
7878
uses: MishaKav/pytest-coverage-comment@v1.1.56
7979
with:
8080
junitxml-path: ./cov.xml
8181

82+
- name: Upload test results
83+
uses: actions/upload-artifact@v4 # upload test results
84+
if: ${{ !cancelled() }} # run this step even if previous step failed
85+
with:
86+
name: test-results
87+
path: pytest.xml
88+
8289
- name: Build package
8390
run: |
8491
uv build

.github/workflows/test_report.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: "Test Report"
2+
on:
3+
workflow_run:
4+
workflows: ["Build and Test"]
5+
types:
6+
- completed
7+
8+
permissions:
9+
contents: read
10+
actions: read
11+
checks: write
12+
13+
jobs:
14+
report:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: dorny/test-reporter@v2
18+
with:
19+
artifact: test-results
20+
name: Tests
21+
path: "*.xml"
22+
reporter: java-junit

0 commit comments

Comments
 (0)