Skip to content

Commit 874f990

Browse files
committed
Run linting step first in GitHub Actions
1 parent c6197d4 commit 874f990

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/rust.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,23 @@ env:
2525
CARGO_TERM_COLOR: always
2626

2727
jobs:
28+
lint:
29+
name: Lint code
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v4
33+
- name: Check format
34+
run: cargo fmt --check
35+
2836
build:
37+
needs: lint
2938
name: Build and Test
3039
runs-on: ${{ matrix.os }}
3140
strategy:
3241
matrix:
3342
os: [ ubuntu-latest, macos-latest, windows-latest ]
3443
steps:
3544
- uses: actions/checkout@v4
36-
- name: Check format
37-
run: cargo fmt --check
3845
- name: Build
3946
run: cargo build --verbose
4047
- uses: taiki-e/install-action@nextest
@@ -44,6 +51,7 @@ jobs:
4451
run: cargo test --doc --verbose --all-features
4552

4653
codecov:
54+
needs: lint
4755
name: Code Coverage
4856
runs-on: ubuntu-latest
4957
env:

0 commit comments

Comments
 (0)