Skip to content

Commit c42699d

Browse files
committed
Introduce basic incremental mutation testing
We introduce a CI job for mutation testing of PR diffs using cargo-mutants. Missed cases do not trigger a fail of this job yet as we just introduce it now for visibility. We may start enforcing stricter rules at a later stage.
1 parent 3ccf064 commit c42699d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,3 +247,19 @@ jobs:
247247
rustup component add rustfmt
248248
- name: Run rustfmt checks
249249
run: ci/rustfmt.sh
250+
251+
incremental-mutants:
252+
runs-on: ubuntu-latest
253+
steps:
254+
- uses: actions/checkout@v3
255+
with:
256+
fetch-depth: 0
257+
- name: Relative diff
258+
run: |
259+
git branch -av
260+
git diff origin/main.. | tee git.diff
261+
- uses: Swatinem/rust-cache@v2
262+
- name: Mutants
263+
run: |
264+
cargo install cargo-mutants
265+
cargo mutants --no-shuffle -j 2 -vV --in-diff git.diff

0 commit comments

Comments
 (0)