Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .cargo/mutants.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
profile = "mutants"
42 changes: 42 additions & 0 deletions .github/workflows/mutations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Test mutants

permissions:
contents: read

env:
CARGO_TERM_COLOR: always

on:
push:
branches:
- main
pull_request:

jobs:
incremental-mutants:
name: Incremental mutants test
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Relative diff
run: |
git branch -av
git diff origin/${{ github.base_ref }}.. | tee git.diff
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Install Rust toolchain
uses: taiki-e/install-action@v2
with:
tool: cargo-mutants
- name: Mutants
run: |
cargo mutants --no-shuffle -vV --exclude "example-crates/**" --in-diff git.diff -- --all-targets
- name: Archive mutants.out
uses: actions/upload-artifact@v4
if: always()
with:
name: mutants-incremental.out
path: mutants.out
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ Cargo.lock

# Ignore media (should go into media branch)
*.gif

# Ignore cargo-mutants generated output
/mutants.out*
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,8 @@ print_stderr = "deny"

[workspace.lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage,coverage_nightly)'] }

[profile.mutants]
inherits = "test"
debug = "none"
opt-level = 3
Loading