Skip to content

Commit 3efab9c

Browse files
authored
Merge pull request #8 from johanhelsing/update-ci
Update ci workflow
2 parents 8dff288 + e1ca634 commit 3efab9c

File tree

1 file changed

+21
-28
lines changed

1 file changed

+21
-28
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -15,59 +15,52 @@ jobs:
1515
uses: actions/checkout@v2
1616

1717
- name: Install stable toolchain
18-
uses: actions-rs/toolchain@v1
18+
uses: dtolnay/rust-toolchain@stable
1919
with:
20-
profile: minimal
2120
toolchain: stable
22-
override: true
2321

24-
- name: Run cargo check
25-
uses: actions-rs/cargo@v1
26-
with:
27-
command: check
22+
- name: Cache
23+
uses: Swatinem/rust-cache@v2
24+
25+
- name: Check
26+
run: cargo check --all-targets
2827

2928
test:
3029
name: Test Suite
3130
runs-on: ubuntu-latest
3231
steps:
3332
- name: Checkout sources
34-
uses: actions/checkout@v2
33+
uses: actions/checkout@v3
3534

3635
- name: Install stable toolchain
37-
uses: actions-rs/toolchain@v1
36+
uses: dtolnay/rust-toolchain@stable
3837
with:
39-
profile: minimal
4038
toolchain: stable
41-
override: true
4239

43-
- name: Run cargo test
44-
uses: actions-rs/cargo@v1
45-
with:
46-
command: test
40+
- name: Cache
41+
uses: Swatinem/rust-cache@v2
42+
43+
- name: Test
44+
run: cargo test
4745

4846
lints:
4947
name: Lints
5048
runs-on: ubuntu-latest
5149
steps:
5250
- name: Checkout sources
53-
uses: actions/checkout@v2
51+
uses: actions/checkout@v3
5452

5553
- name: Install stable toolchain
56-
uses: actions-rs/toolchain@v1
54+
uses: dtolnay/rust-toolchain@stable
5755
with:
58-
profile: minimal
5956
toolchain: stable
60-
override: true
6157
components: rustfmt, clippy
6258

63-
- name: Run cargo fmt
64-
uses: actions-rs/cargo@v1
65-
with:
66-
command: fmt
67-
args: --all -- --check
59+
- name: Cache
60+
uses: Swatinem/rust-cache@v2
61+
62+
- name: Fmt
63+
run: cargo fmt --all -- --check
6864

6965
- name: Run cargo clippy
70-
uses: actions-rs/cargo@v1
71-
with:
72-
command: clippy
73-
args: -- -D warnings
66+
run: cargo clippy -- -D warnings

0 commit comments

Comments
 (0)