Skip to content

Commit

Permalink
Merge branch 'main' into ci-clippy-matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
sourcefrog authored Dec 6, 2024
2 parents c4098bd + 10a6c33 commit f26bc17
Show file tree
Hide file tree
Showing 42 changed files with 834 additions and 612 deletions.
64 changes: 15 additions & 49 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
strategy:
matrix:
os: [macOS-latest, ubuntu-latest, windows-latest]
version: [stable, nightly, "1.74"]
version: [stable, nightly, "1.78"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -117,47 +117,20 @@ jobs:
# Clippy checks can vary between versions in a way that makes it a bit
# fiddly to satisfy them all, so only insist that they pass on stable.
run: cargo clippy --all-targets --all-features -- -D warnings
- run: cargo update
- name: Test after cargo update
run: cargo test --workspace
- name: Downgrade to minimal versions
if: matrix.version == 'nightly'
run: cargo +nightly -Zdirect-minimal-versions update
- name: Test on minimal versions
if: matrix.version == 'nightly'
run: cargo test
- name: Install locked
run: cargo install --locked --path .
run: cargo install --path . --locked
- name: Install unlocked
run: cargo install --path .

minimal-versions:
needs: [quick-test]
strategy:
matrix:
os: [macOS-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
- run: cargo +nightly -Zdirect-minimal-versions update
- run: cargo build --all-targets
- uses: taiki-e/install-action@v2
name: Install nextest using install-action
with:
tool: nextest
- run: cargo test

# Run `cargo update` and check the tests still pass
maximal-versions:
needs: [quick-test]
strategy:
matrix:
os: [macOS-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
- run: cargo update
- uses: taiki-e/install-action@v2
name: Install nextest using install-action
with:
tool: nextest
- run: cargo test

tests-from-tarball:
needs: [quick-test]
strategy:
Expand Down Expand Up @@ -224,6 +197,7 @@ jobs:
run: >
cargo mutants --no-shuffle -vV --in-diff git.diff
--test-tool=${{matrix.test_tool}} --timeout=500 --build-timeout=500
--exclude=windows.rs --exclude=console.rs
- name: Archive mutants.out
uses: actions/upload-artifact@v4
if: always()
Expand Down Expand Up @@ -261,7 +235,8 @@ jobs:
run: >
cargo mutants --no-shuffle -vV --shard ${{ matrix.shard }}/10
--test-tool ${{ matrix.test_tool }} --baseline=skip --timeout=500
--build-timeout=500 --in-place
--build-timeout=500 --in-place --exclude=windows.rs
--exclude=console.rs
- name: Archive mutants.out
uses: actions/upload-artifact@v4
if: always()
Expand All @@ -270,16 +245,7 @@ jobs:
path: mutants.out

overall-result:
needs:
[
quick-test,
test,
minimal-versions,
maximal-versions,
tests-from-tarball,
pr-mutants,
cargo-mutants,
]
needs: [quick-test, test, tests-from-tarball, pr-mutants, cargo-mutants]
runs-on: ubuntu-latest
if: always()
steps:
Expand Down
62 changes: 31 additions & 31 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cargo-mutants"
version = "24.11.0"
version = "24.11.2"
edition = "2021"
authors = ["Martin Pool"]
license = "MIT"
Expand All @@ -9,7 +9,7 @@ repository = "https://github.com/sourcefrog/cargo-mutants"
homepage = "https://mutants.rs/"
categories = ["development-tools::testing"]
keywords = ["testing", "mutants", "cargo", "mutation-testing", "coverage"]
rust-version = "1.74"
rust-version = "1.78"

[package.metadata.wix]
upgrade-guid = "CA7BFE8D-F3A7-4D1D-AE43-B7749110FA90"
Expand All @@ -22,7 +22,7 @@ eula = false
[dependencies]
anyhow = "1.0.86"
camino = "1.1.6"
cargo_metadata = "0.18"
cargo_metadata = "0.19"
clap = { version = "4.4.1", features = [
"deprecated",
"derive",
Expand All @@ -39,15 +39,15 @@ globset = "0.4.10"
humantime = "2.1.0"
ignore = "0.4.20"
indoc = "2.0.0"
itertools = "0.12"
itertools = "0.13"
jobserver = "0.1"
mutants = "0.0.3"
num_cpus = "1.16"
patch = "0.7"
path-slash = "0.2"
quote = "1.0.35"
regex = "1.10"
serde_json = "1.0.117"
serde_json = "1.0.118"
similar = "2.1"
strum = { version = "0.26", features = ["derive"] }
tempfile = "3.8"
Expand Down Expand Up @@ -76,7 +76,7 @@ version = "2.0.46"
features = ["full", "extra-traits", "visit"]

[target.'cfg(unix)'.dependencies]
nix = { version = "0.28", features = ["process", "signal"] }
nix = { version = "0.29", features = ["process", "signal"] }

[dev-dependencies]
assert_cmd = "2.0"
Expand Down
10 changes: 10 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

## Unreleased

- Better estimation of time remaining, based on the time taken to test mutants so far, excluding the time for the baseline.

## 24.11.2

- Changed: `.gitignore` (and other git ignore files) are only consulted when copying the tree if it is contained within a directory with a `.git` directory.

- Fixed: `.gitignore` files above the git root directory are no longer read. In particular this fixes the problem where `.gitignore *` in the home directory would prevent copying any source trees.

## 24.11.1

- Changed: The arguments of calls to functions or methods named `with_capacity` are not mutated by default. This can be turned off with `--skip-calls-defaults=false` on the command line or `skip_calls_defaults = false` in `.cargo/mutants.toml`.

- New: `--skip-calls=NAME,NAME` on the command line or `skip_calls = [NAMES..]` in `.cargo/mutants.toml` allows configuring other functions whose calls should never be mutated.
Expand Down
2 changes: 2 additions & 0 deletions book/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ src = "src"
title = "cargo-mutants"

[output.html]
git-repository-url = "https://github.com/sourcefrog/cargo-mutants"
edit-url-template = "https://github.com/sourcefrog/cargo-mutants/edit/main/book/{path}"

[output.linkcheck]
follow-web-links = true
Expand Down
Loading

0 comments on commit f26bc17

Please sign in to comment.