Skip to content

Commit 2fc93f7

Browse files
committed
Set nextest behavior on empty runs more explicitly
`cargo nextest` will eventually default to `--no-tests=error`, but it doesn't yet. Currently, `cargo nextest run -p gitoxide-core` runs no tests, as there are non in `gitoxide-core` (checked by running `git grep '#.*\[.*test' -- gitoxide-core`). This adds `--no-tests=warn` to that command in the `unit-tests` recipe in `justfile`, to make the default behavior explicit. For CI (but not otherwise), this sets the default to `fail` now by setting the `NEXTEST_NO_TESTS` environment variable. (This is overridden by `--no-tests=warn` so it does not fail `unit-tests`.)
1 parent b9a6fb1 commit 2fc93f7

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.github/workflows/ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ permissions:
1919
env:
2020
CARGO_TERM_COLOR: always
2121
CLICOLOR: '1'
22+
NEXTEST_NO_TESTS: fail
2223

2324
jobs:
2425
pure-rust-build:

justfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ unit-tests:
191191
cargo nextest run -p gix --no-default-features --features basic,extras,comfort,need-more-recent-msrv
192192
cargo nextest run -p gix --features async-network-client
193193
cargo nextest run -p gix --features blocking-network-client
194-
cargo nextest run -p gitoxide-core --lib
194+
cargo nextest run -p gitoxide-core --lib --no-tests=warn
195195

196196
# These tests aren't run by default as they are flaky (even locally)
197197
unit-tests-flaky:

0 commit comments

Comments
 (0)