Skip to content

Commit 9da7ba3

Browse files
ci(rust): convert rust-ci.yml to thin wrapper (standards#174) (#9)
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 905a766 commit 9da7ba3

1 file changed

Lines changed: 15 additions & 57 deletions

File tree

.github/workflows/rust-ci.yml

Lines changed: 15 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,20 @@
1-
# SPDX-License-Identifier: AGPL-3.0-or-later
1+
# 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]
46

5-
permissions: read-all
7+
on:
8+
push:
9+
branches: [main, master]
10+
pull_request:
611

7-
env:
8-
CARGO_TERM_COLOR: always
9-
RUSTFLAGS: -Dwarnings
12+
permissions:
13+
contents: read
1014

1115
jobs:
12-
test:
13-
runs-on: ubuntu-latest
14-
permissions:
15-
contents: read
16-
steps:
17-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
18-
- uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a # stable
19-
with:
20-
components: rustfmt, clippy
21-
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
22-
23-
- name: Check formatting
24-
run: cargo fmt --all -- --check
25-
26-
- name: Clippy lints
27-
run: cargo clippy --all-targets --all-features -- -D warnings
28-
29-
- name: Run tests
30-
run: cargo test --all-features
31-
32-
- name: Build release
33-
run: cargo build --release
34-
35-
security:
36-
runs-on: ubuntu-latest
37-
permissions:
38-
contents: read
39-
steps:
40-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
41-
- uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a # stable
42-
- name: Install cargo-audit
43-
run: cargo install cargo-audit
44-
- name: Security audit
45-
run: cargo audit
46-
- name: Check for outdated deps
47-
run: cargo install cargo-outdated && cargo outdated --exit-code 1 || true
48-
49-
coverage:
50-
runs-on: ubuntu-latest
51-
permissions:
52-
contents: read
53-
steps:
54-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
55-
- uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a # stable
56-
- name: Install tarpaulin
57-
run: cargo install cargo-tarpaulin
58-
- name: Generate coverage
59-
run: cargo tarpaulin --out Xml
60-
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
61-
with:
62-
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)