Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI

on:
push:
branches: [master]
branches: [main]
pull_request:

permissions:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/mutation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Mutation

on:
push:
branches: [master]
branches: [main]
pull_request:
types: [opened, ready_for_review, synchronize, reopened]
workflow_dispatch:
Expand All @@ -11,7 +11,7 @@ permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || (github.event_name == 'push' && 'master') || github.run_id }}
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || (github.event_name == 'push' && github.ref) || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
Expand All @@ -37,20 +37,20 @@ jobs:
- name: Rebuild mutation results
if: github.event_name == 'push'
run: npm run mutation -- --force
# Runs on master go one at a time and only the tip saves, so an older run cannot replace newer results.
# Runs on the default branch go one at a time and only the tip saves, so an older run cannot replace newer results.
- name: Check baseline revision
id: master-tip
id: default-branch-tip
if: ${{ !cancelled() && github.event_name == 'push' && hashFiles('reports/stryker-incremental.json') != '' }}
shell: bash
run: |
tip=$(git ls-remote --exit-code origin refs/heads/master)
tip=$(git ls-remote --exit-code origin "$GITHUB_REF")
if [[ "${tip%%$'\t'*}" == "$GITHUB_SHA" ]]; then
echo "current=true" >> "$GITHUB_OUTPUT"
else
echo "current=false" >> "$GITHUB_OUTPUT"
fi
- uses: actions/cache/save@v6
if: ${{ !cancelled() && steps.master-tip.outputs.current == 'true' }}
if: ${{ !cancelled() && steps.default-branch-tip.outputs.current == 'true' }}
with:
path: reports/stryker-incremental.json
key: mutation-${{ runner.os }}-${{ github.run_id }}-${{ github.run_attempt }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ Run `npm install` at the root to install dependencies and link the packages decl
- [index.html](index.html) is the entry page. Vite uses its defaults without a configuration file, including its browser target and no production source maps.
- Vite transpiles TypeScript without type-checking. Run `npm run typecheck` to check types; `npm run verify-gate` includes it before the tests and build.
- TypeScript is pinned to the 6.x line.
- Mutation testing uses [Stryker's incremental mode](https://stryker-mutator.io/docs/stryker-js/incremental/). Changes outside mutated source and test files can leave reused results stale; run `npm run mutation -- --force` for a fresh full run. CI does this on pushes to `master`.
- Mutation testing uses [Stryker's incremental mode](https://stryker-mutator.io/docs/stryker-js/incremental/). Changes outside mutated source and test files can leave reused results stale; run `npm run mutation -- --force` for a fresh full run. CI does this on pushes to the default branch.
Loading