Skip to content

Commit 6a85c1c

Browse files
committed
CI: Split up into multiple jobs
1 parent aac49ec commit 6a85c1c

File tree

1 file changed

+33
-23
lines changed

1 file changed

+33
-23
lines changed

.github/workflows/ci.yml

Lines changed: 33 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,32 +12,42 @@ env:
1212
MSRV: 1.46.0
1313

1414
jobs:
15-
backend:
16-
name: Backend
17-
runs-on: ubuntu-18.04
18-
19-
env:
20-
CARGO_INCREMENTAL: 0
21-
RUSTFLAGS: "-C debuginfo=0 -D warnings"
22-
15+
check:
16+
name: Check
17+
runs-on: ubuntu-latest
2318
steps:
2419
- uses: actions/checkout@v2
20+
- run: rustup override set ${{env.MSRV}}
21+
- uses: Swatinem/[email protected]
22+
- run: cargo check --workspace --all-targets
23+
env:
24+
RUSTFLAGS: "-D warnings"
2525

26-
- name: Install Rust v${{ env.MSRV }}
27-
run: |
28-
rustup default ${{ env.MSRV }}
29-
30-
- name: Install lint tools
31-
run: |
32-
rustup component add rustfmt
33-
rustup component add clippy
34-
26+
tests:
27+
name: Tests
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v2
31+
- run: rustup override set ${{env.MSRV}}
3532
- uses: Swatinem/[email protected]
33+
- run: cargo test --workspace
3634

37-
- name: Lint
38-
run: |
39-
cargo fmt -- --check
40-
cargo clippy --all-targets --all-features --all
35+
fmt:
36+
name: Rustfmt
37+
runs-on: ubuntu-latest
38+
steps:
39+
- uses: actions/checkout@v2
40+
- run: rustup override set ${{env.MSRV}}
41+
- run: rustup component add rustfmt
42+
- uses: Swatinem/[email protected]
43+
- run: cargo fmt --all -- --check
4144

42-
- name: Test
43-
run: cargo test
45+
clippy:
46+
name: Clippy
47+
runs-on: ubuntu-latest
48+
steps:
49+
- uses: actions/checkout@v2
50+
- run: rustup override set ${{env.MSRV}}
51+
- run: rustup component add clippy
52+
- uses: Swatinem/[email protected]
53+
- run: cargo clippy --workspace -- --deny warnings

0 commit comments

Comments
 (0)