Skip to content

Commit b0375ff

Browse files
author
Martin Taillefer
committed
Switch to nextest for faster text execution, enable cargo-careful
1 parent 2f2144d commit b0375ff

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

.github/workflows/main.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ jobs:
2626
with:
2727
enable-sccache: true
2828
rust-toolchain: RUST_MSRV
29-
cargo-tools: CARGO_HACK_VERSION
29+
cargo-tools: CARGO_NEXTEST_VERSION, CARGO_HACK_VERSION
3030

3131
# execute
3232
- name: Build
3333
run: cargo hack build --each-feature --workspace --verbose --locked --color always
3434
- name: Tests
3535
if: success() || failure()
36-
run: cargo test --verbose --workspace --all-features
36+
run: cargo nextest run --verbose --workspace --all-features
3737
- name: Docs
3838
if: success() || failure()
3939
env:
@@ -59,14 +59,11 @@ jobs:
5959
enable-sccache: true
6060
rust-toolchain: RUST_LATEST
6161
rust-components: clippy, rustfmt
62-
cargo-tools: CARGO_AUDIT_VERSION, CARGO_DOC2README_VERSION, CARGO_WORKSPACES_VERSION, CARGO_ENSURE_NO_DEFAULT_FEATURES_VERSION, CARGO_ENSURE_NO_CYCLIC_DEPS_VERSION, CARGO_DENY_VERSION, CARGO_SORT_VERSION
62+
cargo-tools: CARGO_DOC2README_VERSION, CARGO_WORKSPACES_VERSION, CARGO_ENSURE_NO_DEFAULT_FEATURES_VERSION, CARGO_ENSURE_NO_CYCLIC_DEPS_VERSION, CARGO_DENY_VERSION, CARGO_SORT_VERSION
6363

6464
# execute
6565
- name: Clippy
6666
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
67-
- name: Audit
68-
if: success() || failure()
69-
run: cargo audit
7067
- name: Source Format
7168
if: success() || failure()
7269
run: cargo fmt -- --check
@@ -161,11 +158,14 @@ jobs:
161158
enable-sccache: true
162159
rust-toolchain: RUST_NIGHTLY
163160
rust-components: miri
164-
cargo-tools: CARGO_UDEPS_VERSION
161+
cargo-tools: CARGO_UDEPS_VERSION, CARGO_CAREFUL_VERSION, CARGO_NEXTEST_VERSION
165162

166163
# execute
167164
- name: Udeps
168165
run: cargo +${{ env.RUST_NIGHTLY }} udeps --all-features --workspace --color always
166+
- name: Careful
167+
if: success() || failure()
168+
run: cargo +${{ env.RUST_NIGHTLY }} careful nextest run --all-features --workspace --color always --target ${{ runner.os == 'Linux' && 'x86_64-unknown-linux-gnu' || 'x86_64-pc-windows-msvc' }}
169169
- name: Miri
170170
if: success() || failure()
171171
run: cargo +${{ env.RUST_NIGHTLY }} miri test --all-features --workspace

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ We strive to deliver high-quality code and as such, we've put in place a number
128128
We use [`cargo-hack`](https://crates.io/crates/cargo-hack) to iterate through
129129
different crate feature combinations to make sure everything builds properly.
130130

131-
- **Testing**. We run `cargo test --all-features` to run every normal test and documentation test in the repo.
131+
- **Testing**. We run `cargo nextest --all-features` to run every normal test and documentation test in the repo.
132132

133133
- **Code Coverage**. We calculate code coverage for the whole repo using [
134134
`cargo-llvm-cov`](https://crates.io/crates/cargo-llvm-cov).
@@ -148,10 +148,8 @@ We strive to deliver high-quality code and as such, we've put in place a number
148148
- **Cargo.toml Formatting**. We use [`cargo-sort`](https://crates.io/crates/cargo-sort) to keep Cargo.toml
149149
files in a consistent format and layout.
150150

151-
- **Dependency Auditing**. We use [`cargo-audit`](https://crates.io/crates/cargo-audit) to be alerted of
152-
any security vulnerabilities in our dependencies.
153-
154-
- **Unsafe Verification**. We use Miri to verify that our unsafe code doesn't induce undefined behaviors.
151+
- **Unsafe Verification**. We use Miri and [`cargo-careful`](https://crates.io/crates/cargo-careful) to verify that our
152+
unsafe code doesn't induce undefined behaviors.
155153

156154
- **External Type Exposure**. We use [`cargo-external-types`](https://crates.io/crates/cargo-external-types) to track
157155
which external types our crates depend on. Exposing a 3P type from a crate creates a coupling between the crate and

constants.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ RUST_NIGHTLY = "nightly-2025-12-20" # used for coverage and exte
1010
RUST_NIGHTLY_EXTERNAL_TYPES = "nightly-2025-10-18" # used for external type exposure checks; update alongside updates to cargo-check-external-types
1111

1212
# Cargo tools
13-
CARGO_AUDIT_VERSION = "0.22.0"
13+
CARGO_CAREFUL_VERSION = "0.4.9"
1414
CARGO_CHECK_EXTERNAL_TYPES_VERSION = "0.4.0"
1515
CARGO_DENY_VERSION = "0.18.9"
1616
CARGO_DOC2README_VERSION = "0.6.3"
@@ -19,6 +19,7 @@ CARGO_ENSURE_NO_DEFAULT_FEATURES_VERSION = "1.0.0"
1919
CARGO_HACK_VERSION = "0.6.39"
2020
CARGO_LLVM_COV_VERSION = "0.6.21"
2121
CARGO_MUTANTS_VERSION = "26.0.0"
22+
CARGO_NEXTEST_VERSION = "0.9.115"
2223
CARGO_SEMVER_CHECKS_VERSION = "0.45.0"
2324
CARGO_SORT_VERSION = "2.0.2"
2425
CARGO_UDEPS_VERSION = "0.1.60"

0 commit comments

Comments
 (0)