Skip to content

Commit d231e94

Browse files
committed
fix: replace custom test aggregation with proven GitHub Action
- Replace custom aggregate_test_results.py script with EnricoMi/publish-unit-test-result-action@v2 - Remove 164 lines of custom XML parsing code that had security issues - Eliminate semgrep/bandit warnings from defusedxml usage - Use mature, well-tested action (716 stars) that handles JUnit XML natively - Provides better test reporting: PR comments, check summaries, job summaries - Remove custom test-report-aggregate Makefile target - Simplify workflow from custom script to 4-line action configuration - Zero security vulnerabilities, zero maintenance overhead
1 parent 5242efd commit d231e94

File tree

5 files changed

+27
-17
lines changed

5 files changed

+27
-17
lines changed

.github/workflows/advanced-metrics.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Advanced Metrics Badges
22

3+
permissions:
4+
contents: read
5+
actions: read
6+
37
on:
48
push:
59
branches: [ main ]

.github/workflows/changelog-validation.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
get-config:
1515
name: Get Configuration
1616
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
1719
outputs:
1820
default-python-version: ${{ steps.config.outputs.default-python-version }}
1921
steps:

.github/workflows/ci-tests.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,11 @@ jobs:
9090
runs-on: ubuntu-latest
9191
needs: [config, setup-cache, tests]
9292
if: always()
93-
continue-on-error: true # TODO: Remove once test report generation is stable
9493
permissions:
9594
contents: read
95+
issues: read
96+
checks: write
97+
pull-requests: write
9698

9799
steps:
98100
- name: Checkout code
@@ -109,24 +111,22 @@ jobs:
109111
with:
110112
path: test-results/
111113

112-
- name: Generate test report
113-
run: make test-report
114-
115-
- name: Upload test report
116-
uses: actions/upload-artifact@v4
114+
- name: Publish Test Results
115+
uses: EnricoMi/publish-unit-test-result-action@v2
117116
if: always()
117+
continue-on-error: true
118118
with:
119-
name: reports-test-${{ github.run_number }}
120-
retention-days: 30
121-
path: |
122-
test-results-combined.xml
123-
coverage-combined.xml
124-
htmlcov/
119+
files: "test-results/**/*.xml"
120+
check_name: "Test Results Summary"
121+
comment_mode: "always"
122+
job_summary: true
123+
action_fail: false
124+
fail_on: "nothing"
125125

126126
- name: Upload coverage to Codecov
127127
uses: codecov/codecov-action@v5
128128
if: always()
129129
with:
130-
files: coverage-combined.xml
130+
files: test-results/**/*coverage*.xml
131131
flags: unit
132132
name: unit-tests

.github/workflows/health-monitoring.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
jobs:
99
config:
1010
name: Configuration
11+
permissions:
12+
contents: read
1113
uses: ./.github/workflows/shared-config.yml
1214

1315
health-check:

uv.lock

Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)