@@ -2,36 +2,8 @@ name: CI
2
2
on : [push, pull_request]
3
3
4
4
jobs :
5
- lint :
6
- runs-on : ubuntu-latest
7
- steps :
8
- - uses : actions/checkout@v3
9
- - uses : actions-rs/toolchain@v1
10
- with :
11
- profile : minimal
12
- toolchain : nightly
13
- components : rustfmt, clippy
14
- override : true
15
- - uses : Swatinem/rust-cache@v1
16
- - run : cargo clippy --all-features -- -D warnings
17
- - run : cargo fmt -- --check
18
-
19
- semver-checks :
20
- runs-on : ubuntu-latest
21
- steps :
22
- - uses : actions/checkout@v3
23
- - uses : actions-rs/toolchain@v1
24
- with :
25
- toolchain : stable
26
- profile : minimal
27
- - name : Run cargo-semver-checks
28
- shell : bash
29
- run : |
30
- export CARGO_TERM_COLOR=always
31
- cargo install cargo-semver-checks --locked
32
- cargo semver-checks check-release
33
-
34
5
test :
6
+ name : Test ${{ matrix.rust }} on ${{ matrix.os }}
35
7
runs-on : ${{ matrix.os }}
36
8
services :
37
9
postgres :
@@ -49,15 +21,38 @@ jobs:
49
21
matrix :
50
22
os : [ubuntu-latest]
51
23
rust :
24
+ - MSRV
52
25
- stable
53
- - 1.59
54
26
steps :
55
- - uses : actions/checkout@v3
56
- - uses : actions-rs/toolchain@v1
57
- with :
58
- toolchain : ${{ matrix.rust }}
59
- profile : minimal
60
- override : true
27
+ - uses : actions/checkout@v4
28
+
29
+ # If testing stable Rust, do so with the latest dependencies.
30
+ - uses : dtolnay/rust-toolchain@stable
31
+ id : toolchain
32
+ if : matrix.rust == 'stable'
33
+ - run : rustup override set ${{steps.toolchain.outputs.name}}
34
+ if : matrix.rust == 'stable'
35
+ - name : Remove lockfile to build with latest dependencies
36
+ run : rm Cargo.lock
37
+ if : matrix.rust == 'stable'
38
+
61
39
- uses : Swatinem/rust-cache@v1
62
40
- run : cargo build --tests
63
41
- run : cargo test -- --nocapture --quiet
42
+
43
+ clippy-msrv :
44
+ name : Clippy (MSRV)
45
+ runs-on : ubuntu-latest
46
+ steps :
47
+ - uses : actions/checkout@v4
48
+ - uses : Swatinem/rust-cache@v1
49
+ - run : cargo clippy --all-features -- -D warnings
50
+ - run : cargo fmt -- --check
51
+
52
+ fmt :
53
+ name : Rustfmt
54
+ runs-on : ubuntu-latest
55
+ steps :
56
+ - uses : actions/checkout@v4
57
+ - name : Check formatting
58
+ run : cargo fmt --all -- --check
0 commit comments