Work around Gitea Checks API 404 in the JUnit reporter
mikepenz/action-junit-report defaults to creating a check run via the Checks API, which Gitea does not support -- the call 404s and the publish step fails (mikepenz/action-junit-report#23). Set annotate_only: true on both reporter steps to skip check creation, and detailed_summary: true so results still show up in the job summary (which Gitea's runner does render). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -23,12 +23,16 @@ jobs:
|
|||||||
# path to land the report in the workspace root for the reporter below.
|
# path to land the report in the workspace root for the reporter below.
|
||||||
- name: test (JUnit)
|
- name: test (JUnit)
|
||||||
run: ctest --test-dir build --output-on-failure --output-junit "$(pwd)/ctest-junit.xml"
|
run: ctest --test-dir build --output-on-failure --output-junit "$(pwd)/ctest-junit.xml"
|
||||||
|
# annotate_only: true skips creating a check run via the Checks API, which
|
||||||
|
# Gitea does not support and 404s on (mikepenz/action-junit-report#23).
|
||||||
|
# Results surface via the job summary instead.
|
||||||
- name: publish test results
|
- name: publish test results
|
||||||
if: always()
|
if: always()
|
||||||
uses: mikepenz/action-junit-report@v4
|
uses: mikepenz/action-junit-report@v4
|
||||||
with:
|
with:
|
||||||
report_paths: 'ctest-junit.xml'
|
report_paths: 'ctest-junit.xml'
|
||||||
check_name: 'ctest results'
|
annotate_only: true
|
||||||
|
detailed_summary: true
|
||||||
fail_on_failure: 'true'
|
fail_on_failure: 'true'
|
||||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
- run: echo "🍏 This job's status is ${{ job.status }}."
|
||||||
|
|
||||||
@@ -51,11 +55,13 @@ jobs:
|
|||||||
python3 scripts/mutation_test.py --target src/error.c --junit mutation-junit.xml --threshold 65
|
python3 scripts/mutation_test.py --target src/error.c --junit mutation-junit.xml --threshold 65
|
||||||
# Publish even when the threshold gate fails, so survivors are visible.
|
# Publish even when the threshold gate fails, so survivors are visible.
|
||||||
# Display-only (fail_on_failure: false); the --threshold above is the gate.
|
# Display-only (fail_on_failure: false); the --threshold above is the gate.
|
||||||
|
# annotate_only avoids the Checks API 404 on Gitea (see note above).
|
||||||
- name: publish mutation results
|
- name: publish mutation results
|
||||||
if: always()
|
if: always()
|
||||||
uses: mikepenz/action-junit-report@v4
|
uses: mikepenz/action-junit-report@v4
|
||||||
with:
|
with:
|
||||||
report_paths: 'mutation-junit.xml'
|
report_paths: 'mutation-junit.xml'
|
||||||
check_name: 'mutation results'
|
annotate_only: true
|
||||||
|
detailed_summary: true
|
||||||
fail_on_failure: 'false'
|
fail_on_failure: 'false'
|
||||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
- run: echo "🍏 This job's status is ${{ job.status }}."
|
||||||
|
|||||||
@@ -55,7 +55,11 @@ Both the unit tests and the mutation run emit JUnit XML that CI consumes:
|
|||||||
|
|
||||||
`.gitea/workflows/ci.yaml` runs both and feeds the XML to
|
`.gitea/workflows/ci.yaml` runs both and feeds the XML to
|
||||||
`mikepenz/action-junit-report` (with `if: always()`, so results publish even
|
`mikepenz/action-junit-report` (with `if: always()`, so results publish even
|
||||||
when a gate fails). The generated `*-junit.xml` files are git-ignored.
|
when a gate fails). The reporter runs with `annotate_only: true`: Gitea does not
|
||||||
|
implement the Checks API the action uses to create a check run, so creating one
|
||||||
|
404s (mikepenz/action-junit-report#23). `annotate_only` skips that call and the
|
||||||
|
results surface via the job summary (`detailed_summary: true`) instead. The
|
||||||
|
generated `*-junit.xml` files are git-ignored.
|
||||||
|
|
||||||
## Mutation operators
|
## Mutation operators
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user