Skip to content

Commit 60a2185

Browse files
committed
ci: Use reusable workflows for fmt and security_audit
1 parent 47739f1 commit 60a2185

File tree

1 file changed

+10
-24
lines changed

1 file changed

+10
-24
lines changed

.github/workflows/ci.yml

+10-24
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@ defaults:
2626
shell: bash
2727

2828
jobs:
29+
fmt:
30+
uses: smol-rs/.github/.github/workflows/fmt.yml@main
31+
security_audit:
32+
uses: smol-rs/.github/.github/workflows/security_audit.yml@main
33+
permissions:
34+
checks: write
35+
contents: read
36+
issues: write
37+
secrets: inherit
38+
2939
test:
3040
runs-on: ${{ matrix.os }}
3141
strategy:
@@ -65,14 +75,6 @@ jobs:
6575
run: rustup update stable
6676
- run: cargo clippy --all-features --all-targets
6777

68-
fmt:
69-
runs-on: ubuntu-latest
70-
steps:
71-
- uses: actions/checkout@v4
72-
- name: Install Rust
73-
run: rustup update stable
74-
- run: cargo fmt --all --check
75-
7678
miri:
7779
runs-on: ubuntu-latest
7880
steps:
@@ -87,19 +89,3 @@ jobs:
8789
env:
8890
MIRIFLAGS: -Zmiri-strict-provenance -Zmiri-symbolic-alignment-check -Zmiri-disable-isolation -Zmiri-ignore-leaks
8991
RUSTFLAGS: ${{ env.RUSTFLAGS }} -Z randomize-layout
90-
91-
security_audit:
92-
permissions:
93-
checks: write
94-
contents: read
95-
issues: write
96-
runs-on: ubuntu-latest
97-
steps:
98-
- uses: actions/checkout@v4
99-
# rustsec/audit-check used to do this automatically
100-
- name: Generate Cargo.lock
101-
run: cargo generate-lockfile
102-
# https://github.com/rustsec/audit-check/issues/2
103-
- uses: rustsec/[email protected]
104-
with:
105-
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)