Skip to content

Commit

Permalink
Update a journey test tree use delcaration to find
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
EliahKagan committed Nov 14, 2024
1 parent eedebe7 commit f1a171b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Setup dependencies
run: sudo apt-get install -y --no-install-recommends liblzma-dev tree
run: sudo apt-get install -y --no-install-recommends liblzma-dev
- uses: extractions/setup-just@v2
- uses: taiki-e/install-action@v2
with:
Expand All @@ -91,8 +91,8 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: Setup dependencies (macos)
if: startsWith(matrix.os, 'macos')
run: brew install tree openssl gnu-sed
- name: "cargo check default features"
run: brew install openssl gnu-sed
- name: cargo check default features
if: startsWith(matrix.os, 'windows')
run: cargo check --workspace --bins --examples
- uses: taiki-e/install-action@v2
Expand Down
2 changes: 1 addition & 1 deletion tests/journey/ein.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ title "Porcelain ${kind}"
)
)
snapshot="$snapshot/porcelain"
(with_program tree
(with_program find
(when "using the 'tool' subcommand"
title "ein tool"
(with "a repo with a tiny commit history"
Expand Down

0 comments on commit f1a171b

Please sign in to comment.