Repository navigation
50 lines (46 loc) · 1.59 KB
/
Copy pathmutation.yml
File metadata and controls
50 lines (46 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Mutation testing
# Informational and opt-in: add the mutation label to a pull request to list
# the mutants on its changed lines that no related test noticed, as review
# input. It is not a required check. Files that start or stop processes are
# not mutated, because a mutant there can signal the runner and every other
# process of its user.
on:
pull_request:
types: [opened, synchronize, reopened, labeled]
paths:
- 'packages/*/src/**'
- 'apps/*/src/**'
- 'apps/*/*/src/**'
- 'scripts/mutation-diff.mjs'
- '.github/workflows/mutation.yml'
permissions:
contents: read
concurrency:
group: mutation-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
changed-lines:
name: Mutation testing on changed lines (informational)
if: contains(github.event.pull_request.labels.*.name, 'mutation')
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 2
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
cache: pnpm
- run: pnpm install --frozen-lockfile
# The checkout is the merge commit, so its first parent is the base
# branch and the diff against it is exactly this pull request.
- run: node scripts/mutation-diff.mjs --base HEAD^1 --budget-minutes 30
- uses: actions/upload-artifact@v7
if: ${{ !cancelled() }}
with:
name: mutation-report
path: .tmp/mutation/
if-no-files-found: ignore
retention-days: 7