mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-29 19:34:29 +01:00
The daily stable release now ignores failures from workflows that are
documented as never blocking, starting with the weekly mutation report
that held back v1.104.2.0, and the mutation report runs again.
Why: stable releases should ship every fully tested commit, and today's
cut of 778934c0 was refused only because a report-only check failed on
it. Nothing to do after merge; the next daily run can cut v1.104.2.0.
Issue: GST-4095
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Review-Finding: p1/outside-voice#1 reader=outside-voice
Review-Finding: p1/outside-voice#2 reader=outside-voice
Review-Finding: p1/outside-voice#3 reader=outside-voice
74 lines
3.1 KiB
YAML
74 lines
3.1 KiB
YAML
name: Mutation report
|
|
|
|
# Weekly, report-only mutation trial (docs/TESTING_INTERNALS.md#mutation-report).
|
|
# StrykerJS plants small wrong edits in the five lib files with the most commits
|
|
# in the last 90 days and runs the tests that import each file; the step summary
|
|
# and the artifact list every edit no test caught. It never blocks a merge: it
|
|
# is not a required check and does not run on pull requests.
|
|
#
|
|
# Stryker and its Bun runner are installed at exact versions into the runner's
|
|
# temp directory (scripts/mutation-report.ts STRYKER_PACKAGES), so package.json
|
|
# and bun.lock do not change. Stryker edits files in place, so it runs only in
|
|
# this job's own disposable checkout.
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 6 * * 6' # Saturday 06:00 UTC, away from Monday's periodic census
|
|
workflow_dispatch:
|
|
inputs:
|
|
files:
|
|
description: How many of the most-changed lib files to mutate
|
|
type: string
|
|
default: '5'
|
|
|
|
concurrency:
|
|
group: mutation-report
|
|
cancel-in-progress: false
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
mutation-report:
|
|
name: Mutation report
|
|
runs-on: ubicloud-standard-16
|
|
timeout-minutes: 330
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
with:
|
|
fetch-depth: 0
|
|
filter: blob:none
|
|
persist-credentials: false
|
|
- name: Prepare the same inputs as a free-suite shard
|
|
run: |
|
|
bash scripts/ubicloud/setup-free-suite.sh
|
|
echo "$HOME/.bun/bin" >> "$GITHUB_PATH"
|
|
# build:gates in the setup rebuilds the committed lib/diagram-render/dist
|
|
# bundle, whose bytes differ by machine, so the checkout read as dirty
|
|
# and the report refused to start (run 46115058363). This checkout has no
|
|
# edits of its own, and the report restores this same committed tree with
|
|
# git after every file, so put it back before the report's clean-tree check.
|
|
- name: Restore tracked files the setup rebuilt
|
|
run: |
|
|
git status --short --untracked-files=no
|
|
git checkout -- .
|
|
- name: Install pinned Stryker outside the checkout
|
|
run: |
|
|
set -euo pipefail
|
|
read -ra packages <<< "$(bun --no-env-file --config=/dev/null -e 'import { STRYKER_PACKAGES } from "./scripts/mutation-report.ts"; console.log(STRYKER_PACKAGES.join(" "))')"
|
|
npm install --prefix "$RUNNER_TEMP/stryker" --no-save --no-audit --no-fund --ignore-scripts "${packages[@]}"
|
|
- name: Run the mutation report
|
|
env:
|
|
FILES: ${{ inputs.files || '5' }}
|
|
run: |
|
|
set -euo pipefail
|
|
GSTACK_HOME="$RUNNER_TEMP/gstack-home" xvfb-run -a bun --no-env-file --config=/dev/null scripts/mutation-report.ts \
|
|
--throwaway-checkout --files "$FILES" --concurrency 14 --file-budget-min 55 \
|
|
--stryker-dir "$RUNNER_TEMP/stryker" --out-dir "$RUNNER_TEMP/mutation" --summary-file "$GITHUB_STEP_SUMMARY"
|
|
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
|
if: always()
|
|
with:
|
|
name: mutation-report
|
|
path: ${{ runner.temp }}/mutation/
|
|
if-no-files-found: ignore
|