Skip to content

Commit 8088526

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 f07f4b9 commit 8088526

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/build.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,3 +219,25 @@ jobs:
219219
- name: Run default clippy linting
220220
run: |
221221
cargo clippy -- -Aclippy::erasing_op -Aclippy::never_loop -Aclippy::if_same_then_else -Dclippy::try_err
222+
223+
mutation:
224+
runs-on: ubuntu-latest
225+
steps:
226+
- name: Checkout source code
227+
- uses: actions/checkout@v3
228+
with:
229+
fetch-depth: 0
230+
- name: Relative diff
231+
run: |
232+
git branch -av
233+
git diff origin/${{ github.base_ref }}.. | tee git.diff
234+
- run: cargo install cargo-mutants
235+
- name: Mutants
236+
run: |
237+
cargo mutants --no-shuffle -j 2 -vV --in-diff git.diff
238+
- name: Archive mutants.out
239+
uses: actions/upload-artifact@v3
240+
if: always()
241+
with:
242+
name: mutants-incremental.out
243+
path: mutants.out

0 commit comments

Comments
 (0)