---
name: Mutants
"on":
schedule:
- cron: "0 3 * * 1" workflow_dispatch:
permissions:
contents: read
concurrency:
group: mutants-${{ github.workflow }}
cancel-in-progress: false
env:
CARGO_TERM_COLOR: always
CARGO_PROFILE_TEST_DEBUG: "0"
NEXTEST_PROFILE: mutants
RUSTC_WRAPPER: sccache
jobs:
mutants:
name: Mutation testing ${{ strategy.job-index }}
runs-on: ubuntu-latest
timeout-minutes: 355
strategy:
fail-fast: false
matrix:
shard: [0, 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, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 with:
persist-credentials: false
timeout-minutes: 3
- name: Cache cargo downloads
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 timeout-minutes: 3
with:
path: |
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: dl-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
dl-${{ runner.os }}-
- uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 with:
toolchain: stable
timeout-minutes: 5
- uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba timeout-minutes: 5
- name: Install cargo-mutants and cargo-nextest
uses: taiki-e/install-action@8cca0918f8471c33515202b73f56ab27f2bed283 timeout-minutes: 5
with:
tool: cargo-mutants@27.1.0,cargo-nextest
- name: Run mutants
timeout-minutes: 340
env:
SHARD: ${{ strategy.job-index }}/${{ strategy.job-total }}
run: cargo mutants --workspace --jobs 2 --shard "$SHARD"
- name: Upload mutation outcome
if: always()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 timeout-minutes: 3
with:
name: mutants-shard-${{ strategy.job-index }}
path: mutants.out