Skip to content

Commit 41160d3

Browse files
Configured the test engine to generate Junits-style XML reports (#13)
* Configured the test engine to generate Junits-style XML reports * Updated the workflow to archive and publish reports * Cannibalised the Pytest reporter to generate proper Junit XML files. * style: Apply automated code formatting [skip ci] * Suppress the mypy checks for the cannibalised code * style: Apply automated code formatting [skip ci] * Cannibalised the Pytest reporter to generate proper Junit XML files. * Generated a single file report for better readabilty --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 8e3546d commit 41160d3

File tree

4 files changed

+626
-3
lines changed

4 files changed

+626
-3
lines changed

.github/workflows/test.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,19 @@ jobs:
4343
JWT_KEY: ${{ secrets.JWT_KEY }}
4444
CLIENT_ID: ${{ secrets.CLIENT_ID }}
4545
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
46+
47+
- name: Upload Results
48+
uses: actions/upload-artifact@v4
49+
if: always()
50+
with:
51+
name: test-results
52+
path: build/reports/**/*.xml
53+
54+
- name: Generate Report
55+
if: ${{ always() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false) }}
56+
uses: dorny/test-reporter@v2.0.0
57+
with:
58+
name: Tests
59+
reporter: java-junit
60+
path: build/reports/**/*.xml
61+
token: ${{ secrets.GITHUB_TOKEN }}

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@ addopts = [
5454
"--cov=zitadel_client",
5555
"--cov-report=html:build/coverage/html",
5656
"--cov-report=lcov:build/coverage/lcov.info",
57-
"--cov-report=term"
57+
"--cov-report=term",
58+
"--xml-junit-dir=build/reports/"
5859
]
60+
junit_family= "legacy"
5961

6062
[tool.coverage.run]
6163
data_file = "build/coverage/.coverage"

0 commit comments

Comments
 (0)