Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Omit NEXTEST_NO_TESTS: fail, now that it's the default #1707

Merged
merged 2 commits into from
Nov 28, 2024

Conversation

EliahKagan
Copy link
Member

@EliahKagan EliahKagan commented Nov 28, 2024

This PR changes ci.yml to no longer explicitly tell cargo nextest to treat the unexpected absence of any test cases as an error, since that is now that runner's default behavior.

In 2fc93f7 (#1675), I added this to the top-level env in ci.yml, to get failures whenever a cargo nextest command looks for tests to run but doesn't find any:

NEXTEST_NO_TESTS: fail

That commit also added --no-tests=warn in the one place where we deliberately have that happen:

cargo nextest run -p gitoxide-core --lib --no-tests=warn

Yesterday, cargo-nextest v0.9.85 was released. This includes the planned change nextest-rs/nextest#1646 that makes failure the default behavior here. That makes NEXTEST_NO_TESTS: fail superfluous. The change in this PR is done in two commits, to verify that it is now superfluous, but they can be squashed into one if desired.

Whether we should continue to set that explicitly is subjective, which is why I'm opening a PR just for it without including anything else (so it's easy to make a decision about this, whatever the decision is). It seems to me that we shouldn't, on the grounds that it was effectively a workaround for the preferable default cargo nextest not automatically treating that as an error, as well as a preparation for the nextest behavior change that has come in as of v0.9.85.

This reverts commit 2fc93f7. The
change to the `justfile` should be kept, but is temporarily
reverted to verify that the change in `ci.yml` is no longer needed.
This was temporarily removed to verify that we no longer need to
set `NEXTEST_NO_TESTS` to `fail` explicitly in `ci.yml` to get that
failing behavior, now that it is implied starting in
`cargo-nextest` version 0.9.85.

It is now brought back, so that we do not get that error in the one
place where we know there are no test cases yet do tell `nextest`
to run tests.
@EliahKagan EliahKagan changed the title Omit NEXTEST_NO_TESTS: fail, now that it's implied Omit NEXTEST_NO_TESTS: fail, now that it's the default Nov 28, 2024
@Byron
Copy link
Member

Byron commented Nov 28, 2024

That's a great catch! I am happy that nextest changed it's default behaviour to something more intuitive, so there is no need for extra configuration anymore.

@Byron Byron merged commit 1d73d00 into GitoxideLabs:main Nov 28, 2024
20 checks passed
@EliahKagan EliahKagan deleted the run-ci/when-no-tests-next branch November 28, 2024 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants