diff --git a/.github/workflows/mutation_testing.yml b/.github/workflows/mutation_testing.yml new file mode 100644 index 000000000000..7fde6885bd52 --- /dev/null +++ b/.github/workflows/mutation_testing.yml @@ -0,0 +1,32 @@ +name: Run Cargo Mutants + +on: + workflow_dispatch: + +jobs: + mutation-testing: + name: Mutation Testing with cargo-mutants + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + + - name: Cache Cargo dependencies + uses: actions/cache@v3 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} + restore-keys: cargo-${{ runner.os }}- + + - name: Install cargo-mutants + run: cargo install cargo-mutants + + - name: Run Mutation Tests + run: cargo mutants --baseline skip --in-place diff --git a/mutants.toml b/mutants.toml new file mode 100644 index 000000000000..e65fe93403c9 --- /dev/null +++ b/mutants.toml @@ -0,0 +1,12 @@ +[cargo] +test = [ + "--profile", "ci", + "--exclude", "datafusion-examples", + "--exclude", "ffi_example_table_provider", + "--exclude", "datafusion-benchmarks", + "--workspace", + "--lib", + "--tests", + "--bins", + "--features", "avro,json,backtrace,integration-tests", +]