Skip to content

Commit f3b640b

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 c57b94a commit f3b640b

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/build.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,3 +230,28 @@ jobs:
230230
rustup component add rustfmt
231231
- name: Run rustfmt checks
232232
run: ci/rustfmt.sh
233+
234+
incremental-mutants:
235+
runs-on: ubuntu-latest
236+
steps:
237+
- uses: actions/checkout@v3
238+
with:
239+
fetch-depth: 0
240+
- name: Relative diff
241+
run: |
242+
git branch -av
243+
git diff upstream/main.. | tee git.diff
244+
- uses: Swatinem/rust-cache@v2
245+
- uses: taiki-e/install-action@v2
246+
name: Install cargo-mutants using install-action
247+
with:
248+
tool: cargo-mutants
249+
- name: Mutants
250+
run: |
251+
cargo mutants --no-shuffle -j 2 -vV --in-diff git.diff
252+
- name: Archive mutants.out
253+
uses: actions/upload-artifact@v3
254+
if: always()
255+
with:
256+
name: mutants-incremental.out
257+
path: mutants.out

0 commit comments

Comments
 (0)