From b9a6fb1fe1e79b25a06785384391975d7879d5ee Mon Sep 17 00:00:00 2001 From: Eliah Kagan Date: Thu, 14 Nov 2024 03:52:10 -0500 Subject: [PATCH 1/3] Change quoted nextest `--all` arg to `--workspace` This changes the deprecated `--all` option for `cargo nextest` to the recommended (and equivelent) `--workspace` option, in quoted default argument values for recipes in `justfile`. Other occurrences of `--all` to `cargo nextest`, and other commands for which `--all` is a deprecated alias of `--workspace`, were changed to `--workspace` in 14d472d (#1654), but I had missed these. --- justfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/justfile b/justfile index 3b3fa6db97f..caab60c4b8d 100755 --- a/justfile +++ b/justfile @@ -245,10 +245,10 @@ audit: cargo deny check advisories bans licenses sources # run tests with `cargo nextest` (all unit-tests, no doc-tests, faster) -nextest *FLAGS="--all": +nextest *FLAGS="--workspace": cargo nextest run {{ FLAGS }} -summarize EXPRESSION="all()": (nextest "--all --run-ignored all --no-fail-fast --status-level none --final-status-level none -E '" EXPRESSION "'") +summarize EXPRESSION="all()": (nextest "--workspace --run-ignored all --no-fail-fast --status-level none --final-status-level none -E '" EXPRESSION "'") # run nightly rustfmt for its extra features, but check that it won't upset stable rustfmt fmt: From 2fc93f76798ce35f038d52a85b1841fff5280837 Mon Sep 17 00:00:00 2001 From: Eliah Kagan Date: Thu, 14 Nov 2024 04:03:09 -0500 Subject: [PATCH 2/3] 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`.) --- .github/workflows/ci.yml | 1 + justfile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 99961881e49..bcae2edb8bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,7 @@ permissions: env: CARGO_TERM_COLOR: always CLICOLOR: '1' + NEXTEST_NO_TESTS: fail jobs: pure-rust-build: diff --git a/justfile b/justfile index caab60c4b8d..0c32e6f7cf9 100755 --- a/justfile +++ b/justfile @@ -191,7 +191,7 @@ unit-tests: cargo nextest run -p gix --no-default-features --features basic,extras,comfort,need-more-recent-msrv cargo nextest run -p gix --features async-network-client cargo nextest run -p gix --features blocking-network-client - cargo nextest run -p gitoxide-core --lib + cargo nextest run -p gitoxide-core --lib --no-tests=warn # These tests aren't run by default as they are flaky (even locally) unit-tests-flaky: From eeccb4b15dbdb6c493cd33f2255febe50b50dac1 Mon Sep 17 00:00:00 2001 From: Eliah Kagan Date: Thu, 14 Nov 2024 04:11:54 -0500 Subject: [PATCH 3/3] Remove `ci-test-full` recipe and simplify comments This removes the `ci-test-full` justfile target (see #1674), and simplifies and shortens some comments in the justfile, since the distinction between `ci-test` and `ci-test-full` no longer has to be explained, and since some other parts of the comments are no longer applicable (#1673). --- justfile | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/justfile b/justfile index 0c32e6f7cf9..8a80f5370e8 100755 --- a/justfile +++ b/justfile @@ -12,15 +12,10 @@ alias nt := nextest # run all tests, clippy, including journey tests, try building docs test: clippy check doc unit-tests journey-tests-pure journey-tests-small journey-tests-async journey-tests -# run all tests, without clippy, including journey tests, try building docs (and clear target) -ci-test-full: check doc unit-tests clear-target ci-journey-tests - -# run all tests, without clippy, and try building docs (without clearing the target) +# run all tests, without clippy, and try building docs ci-test: check doc unit-tests -# run all journey tests -# these should be run in a fresh clone or after `cargo clean` -# (and workaround a just-issue of deduplicating targets) +# run all journey tests - should be run in a fresh clone or after `cargo clean` ci-journey-tests: journey-tests-pure journey-tests-small journey-tests-async journey-tests clear-target: