Skip to content

Commit 1cd5699

Browse files
committed
ci: Use reusable workflows for fmt and security_audit
1 parent 4ecde29 commit 1cd5699

File tree

1 file changed

+12
-26
lines changed

1 file changed

+12
-26
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 26 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:
@@ -77,14 +87,6 @@ jobs:
7787
run: rustup update stable
7888
- run: cargo clippy --all-features --all-targets
7989

80-
fmt:
81-
runs-on: ubuntu-latest
82-
steps:
83-
- uses: actions/checkout@v4
84-
- name: Install Rust
85-
run: rustup update stable
86-
- run: cargo fmt --all --check
87-
8890
miri:
8991
runs-on: ubuntu-latest
9092
steps:
@@ -103,28 +105,12 @@ jobs:
103105
- name: Install Rust
104106
run: rustup update stable
105107
- name: Loom tests
106-
run: cargo test --release --test loom --features loom
108+
run: cargo test --release --test loom --features loom
107109
env:
108110
RUSTFLAGS: "--cfg=loom"
109111
LOOM_MAX_PREEMPTIONS: 4
110112
- name: Loom tests without default features
111-
run: cargo test --release --test loom --features loom --no-default-features
113+
run: cargo test --release --test loom --features loom --no-default-features
112114
env:
113115
RUSTFLAGS: "--cfg=loom"
114116
LOOM_MAX_PREEMPTIONS: 4
115-
116-
security_audit:
117-
permissions:
118-
checks: write
119-
contents: read
120-
issues: write
121-
runs-on: ubuntu-latest
122-
steps:
123-
- uses: actions/checkout@v4
124-
# rustsec/audit-check used to do this automatically
125-
- name: Generate Cargo.lock
126-
run: cargo generate-lockfile
127-
# https://github.com/rustsec/audit-check/issues/2
128-
- uses: rustsec/[email protected]
129-
with:
130-
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)