Skip to content

Commit 5c8784d

Browse files
ci(rust): convert rust-ci.yml to thin wrapper (standards#174) (#54)
## 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 a975ddb commit 5c8784d

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 @@
1-
<<<<<<< HEAD
21
# SPDX-License-Identifier: MPL-2.0
3-
=======
4-
# SPDX-License-Identifier: MPL-2.0-or-later
5-
>>>>>>> 1637fa5 (chore: sync from parent repo automation)
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.
65
name: Rust CI
76

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

1012
permissions:
1113
contents: read
1214

13-
env:
14-
CARGO_TERM_COLOR: always
15-
RUSTFLAGS: -Dwarnings
16-
1715
jobs:
18-
test:
19-
runs-on: ubuntu-latest
20-
permissions:
21-
contents: read
22-
steps:
23-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
24-
- uses: dtolnay/rust-toolchain@efa25f7f19611383d5b0ccf2d1c8914531636bf9 # stable
25-
with:
26-
components: rustfmt, clippy
27-
- uses: Swatinem/rust-cache@85fb4247b71961ec8fe7c885c0814d47486c6ce0 # v2
28-
29-
- name: Check formatting
30-
run: cargo fmt --all -- --check
31-
32-
- name: Clippy lints
33-
run: cargo clippy --all-targets --all-features -- -D warnings
34-
35-
- name: Run tests
36-
run: cargo test --all-features
37-
38-
- name: Build release
39-
run: cargo build --release
40-
41-
security:
42-
runs-on: ubuntu-latest
43-
permissions:
44-
contents: read
45-
steps:
46-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
47-
- uses: dtolnay/rust-toolchain@efa25f7f19611383d5b0ccf2d1c8914531636bf9 # stable
48-
- name: Install cargo-audit
49-
run: cargo install cargo-audit
50-
- name: Security audit
51-
run: cargo audit
52-
- name: Check for outdated deps
53-
run: cargo install cargo-outdated && cargo outdated --exit-code 1 || true
54-
55-
coverage:
56-
runs-on: ubuntu-latest
57-
permissions:
58-
contents: read
59-
steps:
60-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
61-
- uses: dtolnay/rust-toolchain@efa25f7f19611383d5b0ccf2d1c8914531636bf9 # 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@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5
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)