mirror of
https://github.com/morluto/rea.git
synced 2026-12-06 15:33:56 +08:00
* fix(mutation): include every mutated file in the mutation project Stryker's typescript-checker watches the files the mutation project includes. A mutated file the project leaves out has no watcher, and the sweep aborts with "no watcher is registered for it" before it reports a score. The semantics suite mutates src/rizin/RizinDebugFrames.ts and src/rizin/RizinDebugEvidence.ts, and the reverse-tools suite mutates src/domain/analysisResourceLimits.ts; none of the three was in tsconfig.reverse-tools-mutation.json, so the daily mutation sweep failed before it produced a report. Add the three files to the project. Add scripts/verify/mutation-target-tsconfig.mjs, which reads the resolved mutation targets from both configurations and fails when the project does not cover them or lists a file the repository no longer has. The guard runs in the deep static lane and before the sweep, so the drift is reported by name instead of as a checker abort. * fix(mutation): give the reverse-tools sweep the time it needs The reverse-tools suite reached 805 of 1008 mutants after 57 minutes of mutation testing on the 2026-11-26 scheduled run and was killed by the 60-minute job budget before it could report a score. The suite needs about 70 minutes of mutation testing plus the setup it runs before it. Raise the job budget to 90 minutes so the sweep reports instead of being cancelled. The budget is the only change; the suite and its mutant set are untouched. * fix(ci): select mutation quality for debugger limit changes --------- Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
74 lines
2.9 KiB
YAML
74 lines
2.9 KiB
YAML
name: Mutation sweep
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "47 4 * * *"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: mutation-${{ github.ref }}
|
|
cancel-in-progress: false
|
|
|
|
env:
|
|
HUSKY: "0"
|
|
# Writes only on the default branch for push, schedule, manual dispatch,
|
|
# and workflow_call. Pull requests get an empty token and remote read-only mode.
|
|
TURBO_TOKEN: "${{ (github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && (github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call')) && secrets.TURBO_TOKEN || '' }}"
|
|
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
|
|
TURBO_CACHE: "${{ (github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && (github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call')) && 'local:rw,remote:rw' || 'local:rw,remote:r' }}"
|
|
|
|
jobs:
|
|
mutation:
|
|
name: Mutation sweep (${{ matrix.suite }})
|
|
runs-on: ubuntu-latest
|
|
# The complete reverse-tools sweep hit the previous 60-minute job limit.
|
|
timeout-minutes: 90
|
|
strategy:
|
|
fail-fast: false
|
|
max-parallel: 2
|
|
matrix:
|
|
include:
|
|
- suite: reverse-tools
|
|
config: stryker.config.mjs
|
|
- suite: reverse-tools-semantics
|
|
config: stryker.semantics.config.mjs
|
|
steps:
|
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
|
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
|
with:
|
|
package-manager-cache: false
|
|
node-version-file: .nvmrc
|
|
- name: Cache npm package downloads
|
|
uses: ./.github/actions/npm-cache
|
|
- run: npm ci
|
|
- name: Require mutation targets in the checker projects
|
|
run: npm run verify:mutation-targets
|
|
- name: Reuse portable build outputs across runs
|
|
uses: ./.github/actions/portable-build-cache
|
|
- run: npm run test:prepare
|
|
- name: Run the complete configuration
|
|
env:
|
|
MUTATION_CONFIG: ${{ matrix.config }}
|
|
run: |
|
|
node scripts/prepare-reverse-tools-mutation.mjs
|
|
npx --no-install stryker run "${MUTATION_CONFIG}"
|
|
- name: Require both reports from the completed sweep
|
|
env:
|
|
REPORT_BASE: reports/mutation/${{ matrix.suite }}
|
|
run: |
|
|
test -s "${REPORT_BASE}.json"
|
|
test -s "${REPORT_BASE}.html"
|
|
- name: Retain available mutation diagnostics
|
|
if: ${{ !cancelled() }}
|
|
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
with:
|
|
name: mutation-${{ matrix.suite }}-${{ github.run_attempt }}
|
|
path: |
|
|
reports/mutation/${{ matrix.suite }}.json
|
|
reports/mutation/${{ matrix.suite }}.html
|
|
if-no-files-found: warn
|
|
retention-days: 7
|