Skip to content

Commit aa3bd7b

Browse files
committed
ci: Use reusable workflows for fmt and security_audit
1 parent 470c568 commit aa3bd7b

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: ${{ matrix.os }}
3141
strategy:
@@ -58,27 +68,3 @@ jobs:
5868
- name: Install Rust
5969
run: rustup update stable
6070
- run: cargo clippy --all-features --all-targets
61-
62-
fmt:
63-
runs-on: ubuntu-latest
64-
steps:
65-
- uses: actions/checkout@v4
66-
- name: Install Rust
67-
run: rustup update stable
68-
- run: cargo fmt --all --check
69-
70-
security_audit:
71-
permissions:
72-
checks: write
73-
contents: read
74-
issues: write
75-
runs-on: ubuntu-latest
76-
steps:
77-
- uses: actions/checkout@v4
78-
# rustsec/audit-check used to do this automatically
79-
- name: Generate Cargo.lock
80-
run: cargo generate-lockfile
81-
# https://github.com/rustsec/audit-check/issues/2
82-
- uses: rustsec/audit-check@v2.0.0
83-
with:
84-
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)