akiomik / akiomik/tears

The test target list is now spelled out in both `justfile` and `ci.yml`

Đang mở Phù hợp với người mới
#373 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
documentation
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

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Read the `test` recipe in `justfile` and the `test` job in `ci.yml`, then compare how the surrounding workflow steps invoke commands and set `RUSTUP_TOOLCHAIN`. Try the existing local test entry point and verify that the CI job still produces its required contexts with the same target selection; done means the duplicated target list is gone without changing the test matrix behavior.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
github-actions, rust
Lĩnh vực
build-system, ci-cd
Loại issue
Tái cấu trúc
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
76/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.