ci: clippy and fmt on a lint leg beside each test leg

workspace.yml moves fmt, both clippy runs and the workflow script checks into
the gate's lint-command, so each OS gets a lint (<os>) leg running beside its
gate (<os>) leg. Clippy (about 6 min on Linux and 11 on Windows) no longer runs
before the test build. scripts/test-workspace-tests.py checks both blocks.
This commit is contained in:
aiongg committed 2026-11-17 19:09:20 +00:00
1 parent 688c5beba2
commit 9bd6416966
2 files changed
+28 -19

No files matched your search

+9 -8
View File
@@ -49,24 +49,25 @@ jobs:
cache-paths: .test-inputs/photocraft/corpus
cache-key: photocraft-corpus
cache-key-files: scripts/ci-test-inputs.sh
command: |
python3 scripts/test-workspace-concurrency.py
python3 scripts/test-workspace-tests.py
# A `lint (<os>)` leg beside each `gate (<os>)` leg, so clippy is off the tests' critical path.
lint-command: |
if [ "$RUNNER_OS" = Linux ]; then
python3 scripts/test-workspace-concurrency.py
python3 scripts/test-workspace-tests.py
fi
cargo fmt --check
cargo clippy --workspace --all-targets --locked -- -D warnings
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
command: |
# The tests run once, with every feature, in parallel across test binaries; nextest skips
# doctests, so `cargo test --doc` runs them. The default-feature compile is the first
# clippy run's; the second command runs the crates whose tests check behaviour with a
# doctests, so `cargo test --doc` runs them. The default-feature compile is the lint leg's
# first clippy run; the last command runs the crates whose tests check behaviour with a
# feature off, which an all-features build cannot reach.
cargo nextest run --workspace --all-features --locked --profile ci
cargo test --workspace --doc --all-features --locked
cargo nextest run -p craft-image-codecs -p craft-text --locked --profile ci
windows-command: |
powershell.exe -NoProfile -Command '$ErrorActionPreference = "Stop"; Start-Service Spooler; Add-PrinterDriver -Name "Generic / Text Only"'
cargo fmt --check
cargo clippy --workspace --all-targets --locked -- -D warnings
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
cargo nextest run --workspace --all-features --locked --profile ci
cargo test --workspace --doc --all-features --locked
cargo nextest run -p craft-image-codecs -p craft-text --locked --profile ci