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

Split test CI job into test and test-journey #1674

Merged
merged 2 commits into from
Nov 14, 2024

Conversation

EliahKagan
Copy link
Member

@EliahKagan EliahKagan commented Nov 14, 2024

As detailed in 711c2f5, this splits out the journey tests into their own job, making changes to both justfile and the CI test workflow to do so. This is the change recently discussed in #1668 (#1668 (comment), #1668 (comment)). I've tried to avoid making code comments in the justfile more confusing when doing this, but I may end up opening a subsequent PR to fix them up, depending on the answer to #1673.

This also fixes up the remaining with_program tree in the journey tests, changing it to with_program find (f1a171b). All uses of tree in the journey tests were replaced with find in 3c1bfd5 (#861), but this particular with_program call was not updated to reflect that. This allows the test to run when tree is absent, and nothing else is using it, so this also no longer installs it in any CI jobs. The reason for including this change in this PR is that it was necessary to figure out which commands had to be run to prepare each of test and test-journey.

This also stops installing `tree` on CI.

The `tree` package provides the `tree` command, which is useful but
does not currently appear to be used anywhere. At one time, various
journey tests had used it to generate output for comparison, and
this usage/dependency was declared with `with_program` in 688280b,
which was also when the first command to install it was added to
CI.

Later, `tree` was found to be unportable or otherwise unsuitable in
the counts it output, and all uses of it were replaced with `find`
in 3c1bfd5 (GitoxideLabs#861). At that point, most `with_program` declarations
for it were changed to `find`, but one of them in the `ein` journey
tests was not replaced at that time.

That test does use `find` (and not `tree`), and should declare its
use of `find` rather than `tree`. This commit makes that change.
One benefit of doing so is that it is possible to run the tests on
a CI (or other) system without `tree` without skipping any tests,
so this also removes it from the lists of packages to install with
`apt-get` and `brew` in CI jobs.
In the `justfile`, this renames the old `ci-test` recipe to
`ci-test-full`, and has `ci-test` no longer clean the target
directory nor run journey tests.

The CI `test` job thus remains the same, but it does moderately
less work. A new CI job, `test-journey`, is introduced to run the
journey tests (still via `ci-test-journey` recipe).

This change is intended to allow greater parallelism, and possibly
make caches work better. The CI `test` job has sometimes been a few
minutes slower than before, ever since 5173e9a (GitoxideLabs#1668). See
comments in GitoxideLabs#1668 for some discussion on this change.
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, this is fantastic!

By the looks of it, the separation brings the CI runtime down to about 15 minutes, which is now dominated by the Windows jobs.

Once the journey-test cache kicks in, this particular job should also be faster, and I'd expect it to be faster than the 7 minutes I saw now.

In any case, now I'd expect no disk-space related issues to occur anymore, at least not for a while.

Edit: Merging, as follow-ups could be made in a separate PR.

justfile Show resolved Hide resolved
@Byron Byron merged commit 4d293cb into GitoxideLabs:main Nov 14, 2024
19 checks passed
@EliahKagan EliahKagan deleted the run-ci/journey branch November 14, 2024 08:54
EliahKagan added a commit to EliahKagan/gitoxide that referenced this pull request Nov 14, 2024
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).
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