name: Mutation tests
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, labeled, unlabeled]
permissions:
contents: read
jobs:
mutation:
if: github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'run-mutation-tests')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 - uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4 with:
toolchain: "1.91"
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 - name: Install cargo-mutants
run: cargo install cargo-mutants --locked --version 27.1.0
- name: Run mutation tests
run: cargo mutants --workspace --timeout 120