Skip to content

Commit 2a55cb9

Browse files
ci: update configuration
1 parent 75506d3 commit 2a55cb9

File tree

1 file changed

+66
-24
lines changed

1 file changed

+66
-24
lines changed

.github/workflows/ci.yml

+66-24
Original file line numberDiff line numberDiff line change
@@ -10,41 +10,83 @@ env:
1010
CARGO_TERM_COLORS: always
1111

1212
jobs:
13-
test:
14-
name: Test
13+
check:
14+
name: Check
1515
runs-on: ubuntu-latest
1616
steps:
17-
- name: Checkout
18-
uses: actions/checkout@v3
19-
- name: Retrieve MSRV
20-
id: msrv
21-
run: echo "MSRV=$(cat Cargo.toml | grep -Po '(?<=rust-version = ")([\d\.]+)')" >> $GITHUB_OUTPUT
22-
- name: Install Rust
23-
uses: dtolnay/rust-toolchain@master
24-
with:
25-
toolchain: ${{ steps.msrv.outputs.MSRV }}
26-
- name: Build
27-
run: cargo build --all-features --verbose
28-
- name: Run tests
29-
run: cargo test --all-features --verbose
30-
31-
lint:
32-
name: Lint
17+
- name: Checkout sources
18+
uses: actions/checkout@v4
19+
20+
- name: Install stable toolchain
21+
uses: actions-rs/toolchain@v1
22+
with:
23+
profile: minimal
24+
toolchain: stable
25+
override: true
26+
27+
- name: Run cargo check
28+
uses: actions-rs/cargo@v1
29+
continue-on-error: false
30+
with:
31+
command: check
32+
33+
rustfmt:
34+
name: Rustfmt
3335
runs-on: ubuntu-latest
3436
steps:
35-
- name: Checkout
36-
uses: actions/checkout@v2
37-
- name: Install Rust
38-
uses: dtolnay/rust-toolchain@stable
37+
- name: Checkout repository
38+
uses: actions/checkout@v4
39+
- name: Install Rust toolchain
40+
uses: actions-rs/toolchain@v1
3941
with:
42+
toolchain: 1.85.0
43+
profile: minimal
44+
override: true
4045
components: rustfmt
46+
- uses: Swatinem/rust-cache@v2
4147
- name: Check formatting
4248
uses: actions-rs/cargo@v1
4349
with:
4450
command: fmt
4551
args: --all -- --check
46-
- name: Clippy
52+
53+
clippy:
54+
name: Clippy
55+
runs-on: ubuntu-latest
56+
steps:
57+
- name: Checkout repository
58+
uses: actions/checkout@v4
59+
- name: Install Rust toolchain
60+
uses: actions-rs/toolchain@v1
61+
with:
62+
toolchain: 1.85.0
63+
profile: minimal
64+
override: true
65+
components: clippy
66+
- uses: Swatinem/rust-cache@v2
67+
- name: Clippy check
4768
uses: actions-rs/cargo@v1
4869
with:
4970
command: clippy
50-
args: --all-features -- -D warnings
71+
args: --all-targets --all-features --workspace -- -D warnings
72+
73+
test:
74+
name: Test Suite
75+
runs-on: ubuntu-latest
76+
steps:
77+
- name: Checkout sources
78+
uses: actions/checkout@v4
79+
80+
- name: Install stable toolchain
81+
uses: actions-rs/toolchain@v1
82+
with:
83+
profile: minimal
84+
toolchain: stable
85+
override: true
86+
87+
- name: Run cargo test
88+
uses: actions-rs/cargo@v1
89+
continue-on-error: false
90+
with:
91+
command: test
92+
args: --all-features --verbose

0 commit comments

Comments
 (0)