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>
68 lines
2.8 KiB
YAML
68 lines
2.8 KiB
YAML
name: libakerror CI Build
|
|
run-name: ${{ gitea.actor }} libakerror test
|
|
on: [push]
|
|
|
|
jobs:
|
|
cmake_build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- run: echo "Triggered by ${{ gitea.event_name }} from ${{ gitea.repository }}@${{ gitea.ref }}. Building on ${{ runner.os }}."
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v4
|
|
- name: dependencies
|
|
run: |
|
|
sudo apt-get update -y
|
|
sudo apt-get install -y cmake gcc moreutils
|
|
- name: build and install
|
|
run: |
|
|
mkdir installdir
|
|
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=installdir
|
|
cmake --build build
|
|
cmake --install build
|
|
# --output-junit resolves relative to the test dir, so give an absolute
|
|
# path to land the report in the workspace root for the reporter below.
|
|
- name: test (JUnit)
|
|
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
|
|
if: always()
|
|
uses: mikepenz/action-junit-report@v4
|
|
with:
|
|
report_paths: 'ctest-junit.xml'
|
|
annotate_only: true
|
|
detailed_summary: true
|
|
fail_on_failure: 'true'
|
|
- run: echo "🍏 This job's status is ${{ job.status }}."
|
|
|
|
mutation_test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v4
|
|
- name: dependencies
|
|
run: |
|
|
sudo apt-get update -y
|
|
sudo apt-get install -y cmake gcc moreutils python3
|
|
# Verify the tests actually catch bugs: break the library many ways and
|
|
# confirm the suite fails. Gated on src/error.c (fast, deterministic).
|
|
# The threshold keeps headroom below the current score for equivalent
|
|
# mutants; see tests/MUTATION.md. Run the full default target locally for
|
|
# deeper (slower) coverage including the macro header.
|
|
- name: mutation testing
|
|
run: |
|
|
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.
|
|
# 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
|
|
if: always()
|
|
uses: mikepenz/action-junit-report@v4
|
|
with:
|
|
report_paths: 'mutation-junit.xml'
|
|
annotate_only: true
|
|
detailed_summary: true
|
|
fail_on_failure: 'false'
|
|
- run: echo "🍏 This job's status is ${{ job.status }}."
|