Skip to content

Commit d04a77b

Browse files
hyperpolymathclaude
andcommitted
ci(rust): convert rust-ci.yml to thin wrapper (standards#174)
Replaces the per-repo `rust-ci.yml` copy with a 5-line wrapper invoking the shared reusable workflow in `hyperpolymath/standards` (PR #174). Pinned to PR #174's HEAD SHA `4fdf4314b4ab54269adbaff10e30e483b5e86845`; will resolve to standards/main once #174 merges. Estate audit found ~87 rust-ci.yml copies across the estate; this is one of them. The reusable provides identical cargo check/clippy/fmt/test behaviour with opt-in `enable_audit` + `enable_coverage` inputs. Pattern precedent: standards#168 (governance-reusable) + downstream wrappers absolute-zero#41 + tma-mark2#41. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 3b848bb commit d04a77b

1 file changed

Lines changed: 15 additions & 50 deletions

File tree

.github/workflows/rust-ci.yml

Lines changed: 15 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,20 @@
11
# SPDX-License-Identifier: MPL-2.0
2-
permissions: read-all
3-
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.
45
name: Rust CI
5-
on: [push, pull_request]
6-
env:
7-
CARGO_TERM_COLOR: always
8-
RUSTFLAGS: -Dwarnings
96

10-
jobs:
11-
test:
12-
runs-on: ubuntu-latest
13-
steps:
14-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
15-
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # stable
16-
with:
17-
components: rustfmt, clippy
18-
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2
19-
20-
- name: Check formatting
21-
run: cargo fmt --all -- --check
22-
23-
- name: Clippy lints
24-
run: cargo clippy --all-targets --all-features -- -D warnings
25-
26-
- name: Run tests
27-
run: cargo test --all-features
28-
29-
- name: Build release
30-
run: cargo build --release
7+
on:
8+
push:
9+
branches: [main, master]
10+
pull_request:
3111

32-
security:
33-
runs-on: ubuntu-latest
34-
steps:
35-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
36-
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # stable
37-
- name: Install cargo-audit
38-
run: cargo install cargo-audit
39-
- name: Security audit
40-
run: cargo audit
41-
- name: Check for outdated deps
42-
run: cargo install cargo-outdated && cargo outdated --exit-code 1 || true
12+
permissions:
13+
contents: read
4314

44-
coverage:
45-
runs-on: ubuntu-latest
46-
steps:
47-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
48-
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # stable
49-
- name: Install tarpaulin
50-
run: cargo install cargo-tarpaulin
51-
- name: Generate coverage
52-
run: cargo tarpaulin --out Xml
53-
- uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
54-
with:
55-
files: cobertura.xml
15+
jobs:
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)