Skip to content

Commit a3b3334

Browse files
committed
ci: Use reusable workflows for fmt and security_audit
1 parent e8ccddf commit a3b3334

File tree

1 file changed

+10
-24
lines changed

1 file changed

+10
-24
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 24 deletions
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: ubuntu-latest
3141
strategy:
@@ -88,14 +98,6 @@ jobs:
8898
run: rustup update stable
8999
- run: cargo clippy --all --all-features --all-targets
90100

91-
fmt:
92-
runs-on: ubuntu-latest
93-
steps:
94-
- uses: actions/checkout@v4
95-
- name: Install Rust
96-
run: rustup update stable
97-
- run: cargo fmt --all --check
98-
99101
miri:
100102
runs-on: ubuntu-latest
101103
steps:
@@ -107,19 +109,3 @@ jobs:
107109
echo "RUSTFLAGS=${RUSTFLAGS} -Z randomize-layout" >>"${GITHUB_ENV}"
108110
- run: cargo miri test --all
109111
- run: cargo miri test --no-default-features --tests
110-
111-
security_audit:
112-
permissions:
113-
checks: write
114-
contents: read
115-
issues: write
116-
runs-on: ubuntu-latest
117-
steps:
118-
- uses: actions/checkout@v4
119-
# rustsec/audit-check used to do this automatically
120-
- name: Generate Cargo.lock
121-
run: cargo generate-lockfile
122-
# https://github.com/rustsec/audit-check/issues/2
123-
- uses: rustsec/audit-check@v2.0.0
124-
with:
125-
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)