CI: one Clippy warning skips the Tests step, so a red main has no test results and the asset-policy check never runs #45

Closed
opened 2026-11-26 03:31:31 +00:00 by github-bot · 0 comments
Owner

@⁠itsonewi on GitHub · 2026-11-26 00:06 UTC · original

On main right now the test step does not run, and the reason is not the tests: the workflow lints first, in the same job, and any -D warnings hit ends the job before a test binary is built. The asset-policy check that lives inside the test step is skipped with it.

The evidence

Run 45712194691, job 139549162967 (Windows, check), step by step:

step result
5 Clippy failure (first hit at crates/victory-formats/src/texture.rs:1346)
6 Clippy, diagnostics build skipped
7 Tests skipped

Why

.github/workflows/ci.yml:18-33 is one job with three steps in this order:

jobs:
  check:
    runs-on: windows-latest
    timeout-minutes: 60
    steps:
      - uses: actions/checkout@v5
      - run: rustup toolchain install
      - uses: Swatinem/rust-cache@v2
      - name: Clippy
        run: cargo clippy --workspace --all-targets --locked -- -D warnings
      - name: Clippy, diagnostics build
        run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
      # Includes xtask's repository_passes_policy, the asset-policy check.
      - name: Tests
        run: cargo test --workspace --locked

No if: always(), no continue-on-error, no separate job. Steps in a job run in order and stop at the first failure, so:

  • One Clippy warning anywhere in --all-targets (which includes test code and examples) ⇒ no test result for that commit, of either feature set.
  • The workflow's own comment at :31 says the Tests step is where xtask's repository_passes_policy runs ⇒ the asset-policy check also does not run while the lints are red. That is the guarantee the tree relies on; it is currently unenforced on main, not merely unmeasured.
  • cancel-in-progress on ci-${{ github.ref }} means re-pushing a fix cancels the older run, so a red run leaves nothing behind to compare against.

The reporter's count, from a local run on 0a43566 with --keep-going: 32 distinct lint locations across victory-formats, victory-loader and victory-gpu in the default-feature pass. So this is not a one-line unlock.

This is not #31

#31 is that the test command omits --all-features, so the diagnostics suites and tests/replay.rs never run when the step runs. This issue is that the step does not run at all while lint is red. The fixes do not overlap:

  1. Move tests into their own job (needs: [], no dependency on check), so lint and tests report independently, exactly as @⁠UwUCammie proposed in #31.
  2. In that job, run both feature sets as two steps: cargo test --workspace --locked and cargo test --workspace --all-features --locked (the second covers tests/replay.rs and the diagnostics tests — #31).
  3. Keep the two Clippy passes in the existing check job where they belong; they are the part that should be able to fail alone.

Not checked

Read from .github/workflows/ci.yml at 0a43566 and the job's step results through the API. I did not run the workflow or any test here, and the texture.rs:1346 lint is the reporter's local run, not a CI log line.

AI use

AI-assisted review (workflow file plus job metadata). No build, no run, no game files.

**@⁠itsonewi** on GitHub · 2026-11-26 00:06 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/issues/45) On `main` right now the test step does not run, and the reason is not the tests: the workflow lints first, in the same job, and any `-D warnings` hit ends the job before a test binary is built. The asset-policy check that lives inside the test step is skipped with it. ## The evidence [Run 45712194691, job 139549162967](https://github.com/avatarmanz/VIctory-7900XTX/actions/runs/45712194691/job/139549162967) (Windows, `check`), step by step: | step | result | |---|---| | 5 Clippy | `failure` (first hit at `crates/victory-formats/src/texture.rs:1346`) | | 6 Clippy, diagnostics build | `skipped` | | 7 Tests | `skipped` | ## Why `.github/workflows/ci.yml:18-33` is one job with three steps in this order: ```yaml jobs: check: runs-on: windows-latest timeout-minutes: 60 steps: - uses: actions/checkout@v5 - run: rustup toolchain install - uses: Swatinem/rust-cache@v2 - name: Clippy run: cargo clippy --workspace --all-targets --locked -- -D warnings - name: Clippy, diagnostics build run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings # Includes xtask's repository_passes_policy, the asset-policy check. - name: Tests run: cargo test --workspace --locked ``` No `if: always()`, no `continue-on-error`, no separate job. Steps in a job run in order and stop at the first failure, so: - One Clippy warning anywhere in `--all-targets` (which includes test code and examples) ⇒ **no test result for that commit**, of either feature set. - The workflow's own comment at `:31` says the `Tests` step is where `xtask`'s `repository_passes_policy` runs ⇒ **the asset-policy check also does not run** while the lints are red. That is the guarantee the tree relies on; it is currently unenforced on `main`, not merely unmeasured. - `cancel-in-progress` on `ci-${{ github.ref }}` means re-pushing a fix cancels the older run, so a red run leaves nothing behind to compare against. The reporter's count, from a local run on `0a43566` with `--keep-going`: 32 distinct lint locations across `victory-formats`, `victory-loader` and `victory-gpu` in the default-feature pass. So this is not a one-line unlock. ## This is not #31 #31 is that the test command omits `--all-features`, so the diagnostics suites and `tests/replay.rs` never run **when the step runs**. This issue is that the step does not run **at all** while lint is red. The fixes do not overlap: 1. Move tests into their own job (`needs: []`, no dependency on `check`), so lint and tests report independently, exactly as [@⁠UwUCammie proposed in #31](https://git.gtahub.st/github/avatarmanz--VIctory-7900XTX/issues/31). 2. In that job, run both feature sets as two steps: `cargo test --workspace --locked` and `cargo test --workspace --all-features --locked` (the second covers `tests/replay.rs` and the diagnostics tests — #31). 3. Keep the two Clippy passes in the existing `check` job where they belong; they are the part that should be able to fail alone. ## Not checked Read from `.github/workflows/ci.yml` at `0a43566` and the job's step results through the API. I did not run the workflow or any test here, and the `texture.rs:1346` lint is the reporter's local run, not a CI log line. ## AI use AI-assisted review (workflow file plus job metadata). No build, no run, no game files.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:31:31 +00:00
github-bot 2026-11-26 08:24:50 +00:00
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/avatarmanz--VIctory-7900XTX#45
No description provided.