Skip to content

Commit ef151c8

Browse files
authored
ci: add windows-latest clippy-only leg to the test suite (bd-3j09mpn8) (#915)
Windows compile breakage keeps reaching main undetected because every CI leg runs on Linux/macOS: Unix-only APIs (std::os::unix, OsStringExt::from_vec) and asymmetric #[cfg] gates pass clippy there and only fail on a Windows machine. The recent instances (quarto-mcp- launcher non-UTF-8 test, xtask capture-* dead code) were all compile-level failures that clippy --all-targets on Windows catches without running a single test. Add a windows-clippy job running the same gate as the existing "Clippy (deny warnings)" step: cargo clippy --workspace --all-targets --profile ci -- -D warnings. Compile-only, so it skips the matrix job's pandoc/typst/tree-sitter/ node setup (verified on a fresh Windows checkout: green, ~8 min cold). A full Windows test leg remains separate work. No cargo xtask verify counterpart: verify already runs this exact clippy command on the host platform, so this is the same gate on another OS rather than a new gating step.
1 parent 5ffacc4 commit ef151c8

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

‎.github/workflows/test-suite.yml‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,39 @@ jobs:
299299
# step built is reused rather than rebuilt.
300300
RUSTFLAGS: "-D warnings"
301301

302+
# Windows clippy-only leg (no tests): the same gate as the matrix job's
303+
# "Clippy (deny warnings)" step, on windows-latest. Compile-only —
304+
# --all-targets also compiles test code, which is where Unix-only APIs
305+
# (std::os::unix, OsStringExt::from_vec, ...) and asymmetric #[cfg] gates
306+
# hide; Linux/macOS clippy cannot see them (.claude/rules/cross-platform.md).
307+
# Needs none of the matrix job's pandoc/typst/tree-sitter/node setup:
308+
# verified green on a fresh Windows checkout. A full Windows test leg is
309+
# deliberately out of scope here.
310+
windows-clippy:
311+
name: Clippy (Windows)
312+
runs-on: windows-latest
313+
if: github.repository == 'quarto-dev/q2'
314+
steps:
315+
- name: Checkout Repo
316+
uses: actions/checkout@v6
317+
318+
- name: Set up Rust nightly
319+
uses: dtolnay/rust-toolchain@nightly
320+
321+
- name: Cache Rust dependencies
322+
uses: Swatinem/rust-cache@v2
323+
with:
324+
cache-on-failure: true
325+
# See the matrix job: don't clobber ~/.cargo/bin with stale proxies.
326+
cache-bin: false
327+
shared-key: "rust-test-suite"
328+
329+
- name: Clippy (deny warnings)
330+
shell: bash
331+
run: cargo clippy --workspace --all-targets --profile ci -- -D warnings
332+
env:
333+
RUSTFLAGS: "-D warnings"
334+
302335
wasm-tests:
303336
name: WASM Tests
304337
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)