Skip to content

Commit 5ebef31

Browse files
ci(rust): convert rust-ci.yml to thin wrapper (standards#174) (#49)
## Summary Replaces the per-repo `rust-ci.yml` copy with a 5-line wrapper invoking the shared reusable workflow filed in [standards#174](hyperpolymath/standards#174). Pinned to that PR's HEAD SHA (`4fdf4314b4ab54269adbaff10e30e483b5e86845`); will resolve to standards/main once #174 merges. ## Why Estate audit found ~87 `rust-ci.yml` copies across the estate with significant drift. Converting each to a 5-line wrapper means future Rust CI changes propagate in one place. This PR is part of the foundational sweep following the established [standards#168](hyperpolymath/standards#168) precedent (governance-reusable + absolute-zero#41 + tma-mark2#41 wrappers). Variant: **audit-cov** ("opts into cargo-audit + coverage") ## Test plan - [ ] CI: `rust-ci` job invokes the reusable and reports the same checks - [ ] Awaiting standards#174 merge before this becomes useful long-term (still works today via SHA pin) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent baff609 commit 5ebef31

1 file changed

Lines changed: 12 additions & 60 deletions

File tree

.github/workflows/rust-ci.yml

Lines changed: 12 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,20 @@
11
# SPDX-License-Identifier: MPL-2.0
2+
# Rust CI — thin wrapper calling the shared estate reusable in
3+
# hyperpolymath/standards. Configure once, propagate everywhere.
4+
# See: docs/CI-REUSABLE-WORKFLOWS.adoc in standards.
25
name: Rust CI
3-
on: [push, pull_request]
4-
env:
5-
CARGO_TERM_COLOR: always
6-
RUSTFLAGS: -Dwarnings
76

7+
on:
8+
push:
9+
branches: [main, master]
10+
pull_request:
811

912
permissions:
1013
contents: read
1114

1215
jobs:
13-
test:
14-
runs-on: ubuntu-latest
15-
permissions:
16-
contents: read
17-
steps:
18-
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4.2.2
19-
- uses: dtolnay/rust-toolchain@0b1efabc08b657293548b77fb76cc02d26091c7e # stable
20-
with:
21-
toolchain: stable
22-
components: rustfmt, clippy
23-
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.5
24-
25-
- name: Check formatting
26-
run: cargo fmt --all -- --check
27-
28-
- name: Clippy lints
29-
run: cargo clippy --all-targets --all-features -- -D warnings
30-
31-
- name: Run tests
32-
run: cargo test --all-features
33-
34-
- name: Build release
35-
run: cargo build --release
36-
37-
security:
38-
runs-on: ubuntu-latest
39-
permissions:
40-
contents: read
41-
steps:
42-
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4.2.2
43-
- uses: dtolnay/rust-toolchain@0b1efabc08b657293548b77fb76cc02d26091c7e # stable
44-
with:
45-
toolchain: stable
46-
- name: Install cargo-audit
47-
run: cargo install cargo-audit
48-
- name: Security audit
49-
run: cargo audit
50-
- name: Check for outdated deps
51-
run: cargo install cargo-outdated && cargo outdated --exit-code 1 || true
52-
53-
coverage:
54-
runs-on: ubuntu-latest
55-
permissions:
56-
contents: read
57-
steps:
58-
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4.2.2
59-
- uses: dtolnay/rust-toolchain@0b1efabc08b657293548b77fb76cc02d26091c7e # stable
60-
with:
61-
toolchain: stable
62-
- name: Install tarpaulin
63-
run: cargo install cargo-tarpaulin
64-
- name: Generate coverage
65-
run: cargo tarpaulin --out Xml
66-
- uses: codecov/codecov-action@0561704f0f02c16a585d4c7555e57fa2e44cf909 # v5.4.2
67-
with:
68-
files: cobertura.xml
16+
rust-ci:
17+
uses: hyperpolymath/standards/.github/workflows/rust-ci-reusable.yml@4fdf4314b4ab54269adbaff10e30e483b5e86845
18+
with:
19+
enable_audit: true
20+
enable_coverage: true

0 commit comments

Comments
 (0)