mirror of
https://github.com/morluto/rea.git
synced 2026-11-29 01:46:39 +00:00
Stryker divides concurrency between TypeScript checkers and test runners, so the configurations' concurrency of 2 ran one checker and one test runner. The reverse-tools sweep reached 884 of 1034 mutants before its 90-minute budget and has not completed since 2026-11-14. On four pinned cores, a reverse-tools subset (167 mutants) took 1642 s at 2 and 801 s at 4, with identical outcomes. The workflow now passes --concurrency 4; the configurations keep 2 for shared local machines. Co-authored-by: gensokyo-dev <gensokyo-dev@users.noreply.github.com> Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
77 lines
3.1 KiB
YAML
77 lines
3.1 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
|
|
# Stryker splits concurrency between TypeScript checkers and test
|
|
# runners, so the configurations' local default of 2 leaves one test
|
|
# runner. This runner has 4 vCPUs.
|
|
- 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}" --concurrency 4
|
|
- 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
|