Skip to content

Commit 31a8d57

Browse files
committed
ci: Use reusable workflows for fmt and security_audit
1 parent a75a3c7 commit 31a8d57

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
@@ -13,6 +13,16 @@ env:
1313
RUST_BACKTRACE: 1
1414

1515
jobs:
16+
fmt:
17+
uses: smol-rs/.github/.github/workflows/fmt.yml@main
18+
security_audit:
19+
uses: smol-rs/.github/.github/workflows/security_audit.yml@main
20+
permissions:
21+
checks: write
22+
contents: read
23+
issues: write
24+
secrets: inherit
25+
1626
test:
1727
runs-on: ${{ matrix.os }}
1828
strategy:
@@ -53,27 +63,3 @@ jobs:
5363
- name: Install Rust
5464
run: rustup update stable
5565
- run: cargo clippy --all-features --all-targets
56-
57-
fmt:
58-
runs-on: ubuntu-latest
59-
steps:
60-
- uses: actions/checkout@v4
61-
- name: Install Rust
62-
run: rustup update stable
63-
- run: cargo fmt --all --check
64-
65-
security_audit:
66-
permissions:
67-
checks: write
68-
contents: read
69-
issues: write
70-
runs-on: ubuntu-latest
71-
steps:
72-
- uses: actions/checkout@v4
73-
# rustsec/audit-check used to do this automatically
74-
- name: Generate Cargo.lock
75-
run: cargo generate-lockfile
76-
# https://github.com/rustsec/audit-check/issues/2
77-
- uses: rustsec/audit-check@v2.0.0
78-
with:
79-
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)