-
Notifications
You must be signed in to change notification settings - Fork 5
48 lines (43 loc) · 1.31 KB
/
mutants.yml
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
# Runs mutants tests.
name: Mutants Tests
on:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
DEFAULT_BRANCH: main
concurrency:
group: ${{ github.workflow }}-${{ github.run_id }}
cancel-in-progress: true
jobs:
mutants-test:
name: Generate mutants on diff against default branch and test
runs-on: ubuntu-latest
continue-on-error: true # FIXME: remove this if all mutants are covered
strategy:
fail-fast: false # Collect all mutants even if some are missed
matrix:
shard: [0, 1, 2, 3, 4, 5, 6, 7]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Relative diff
run: |
git branch -av
git diff "origin/$DEFAULT_BRANCH" | tee git.diff
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@v2
name: Install `cargo-mutants`
with:
tool: cargo-mutants
- name: Run `cargo-mutants`
run: |
cargo mutants --no-shuffle -vV --in-diff git.diff --shard ${{ matrix.shard }}/8 --timeout 300
- name: Archive mutants.out
uses: actions/upload-artifact@v4
if: always()
with:
name: mutants-incremental.out
path: mutants-shard${{ matrix.shard }}.out
overwrite: true