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

Assorted justfile and CI workflow maintenance #1675

Merged
merged 3 commits into from
Nov 14, 2024

Conversation

EliahKagan
Copy link
Member

@EliahKagan EliahKagan commented Nov 14, 2024

This makes a few small improvements to the ci.yml workflow and the justfile:

  1. b9a6fb1 changes --all to --workspace that were missed in 14d472d (#1654).

  2. 2fc93f7 expresses what I think is the intended effect of nextest run -p ... commands when ... has no tests:

    • For gitoxide-core, it preserves a warning that will otherwise become an error in a future version of nextest. (I have verified that this is unaffected by #1674, except that the change there makes the message easier to notice.)
    • For everything else, on CI it treats it as an error.
  3. eeccb4b removes ci-test-full as suggested in #1674 (comment), removes the parenthesized text discussed in #1673, and consolidates accordingly.

See the commit messages for further details.

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 (GitoxideLabs#1654), but I had missed
these.
`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`.)
This removes the `ci-test-full` justfile target (see GitoxideLabs#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 (GitoxideLabs#1673).
Copy link
Member

@Byron Byron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot, much appreciated!

@Byron Byron merged commit 881b601 into GitoxideLabs:main Nov 14, 2024
19 checks passed
@EliahKagan EliahKagan deleted the run-ci/when-no-tests branch November 14, 2024 10:11
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