The test target list is now spelled out in both `justfile` and `ci.yml`
- Ngôn ngữ chính
- Rust
- Star
- 9
- Fork
- 1
- Merge trung bình
- 11 giờ 46 phút
- Pull request đã merge (30 ngày)
- 62
Mô tả
## What
After #369 the same target selection appears twice:
- `justfile`'s `test` recipe: `cargo test --lib --bins --tests --examples --features {{build_features}}`
- `ci.yml`'s `test` job: `cargo test --lib --bins --tests --examples --features ${{ needs.versions.outputs.features }}`
The feature lists are the same value — `versions` derives its output with
`just --evaluate build_features` — but the *target flags* are two hand-kept
copies with nothing holding them equal. Adding `--benches` back to one, or
adding a future target class to one, drifts them silently.
## Why it is worth filing
This is the drift class #369 exists to repair, reproduced by the repair. It
did not exist before: the `justfile` said `--all-targets` and `ci.yml` said
the explicit list, so they were visibly different things and nobody expected
them to match. Now they must match, and only a reviewer reading both would
notice if they stopped.
## Shape of a fix
`run: just test`, which is what every other stateful step in that job already
does — `just test-mirrors` is two steps below it, and the job installs `just`
via `taiki-e/install-action@just`. `RUSTUP_TOOLCHAIN` is already set as an env
var, so the recipe would pick up the matrix's toolchain, and
`needs.versions.outputs.features` and `{{build_features}}` are the same string
by construction.
## Why it was not taken in #369
The `test` job produces three of `main`'s eight required contexts, so changing
what it invokes has merge-blocking consequences and deserves its own change.
There is also a judgment in it that the measurement does not settle: routing
through `just` removes the duplication but also removes the command from the
workflow file, where a reader currently sees exactly what CI runs without
opening another file.
Raised in review of #369.
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.