1
1
name : CI
2
2
on :
3
+ workflow_dispatch :
3
4
pull_request :
4
5
push :
5
6
branches :
6
7
- master
7
8
env :
8
9
CARGO_TERM_COLOR : always
9
10
jobs :
10
- test :
11
+ msrv :
11
12
strategy :
12
13
matrix :
13
14
rust :
14
- - rust : stable
15
+ - version : stable
15
16
command : test
16
17
args : " "
17
- - rust : 1.48.0
18
+ - version : 1.48.0
18
19
command : check
19
20
args : " --locked"
20
21
runs-on : ubuntu-latest
21
22
steps :
22
- - uses : actions/checkout@v2
23
- - uses : actions-rs/toolchain@v1
24
- with :
25
- profile : minimal
26
- toolchain : ${{ matrix.rust.rust }}
27
- override : true
23
+ - uses : actions/checkout@v4
24
+ - name : install Rust
25
+ run : rustup toolchain install ${{ matrix.rust.version }} --profile minimal --allow-downgrade
28
26
- run : mv Cargo.lock.msrv Cargo.lock
29
- if : ${{ matrix.rust.rust}} == 1.48.0
30
- - uses : actions-rs/cargo@v1
31
- with :
32
- command : ${{ matrix.rust.command }}
33
- args : ${{ matrix.rust.args }}
34
- fmt-clippy :
35
- runs-on : ubuntu-latest
36
- steps :
37
- - uses : actions/checkout@v2
38
- - uses : actions-rs/toolchain@v1
39
- with :
40
- profile : minimal
41
- toolchain : stable
42
- override : true
43
- components : rustfmt, clippy
44
- - uses : actions-rs/cargo@v1
45
- with :
46
- command : fmt
47
- args : --all -- --check
48
- - uses : actions-rs/clippy-check@v1
49
- with :
50
- token : ${{ secrets.GITHUB_TOKEN }}
51
- args : --all-features
52
- coverage :
27
+ if : ${{ matrix.rust.version}} == 1.48.0
28
+ - name : cargo check/test
29
+ run : cargo ${{ matrix.rust.command }} ${{ matrix.rust.args }}
30
+
31
+ test :
53
32
runs-on : ubuntu-latest
54
33
steps :
55
- - uses : actions/checkout@v2
56
- - uses : actions-rs/toolchain@v1
57
- with :
58
- toolchain : stable
59
- override : true
60
- -
uses :
actions-rs/[email protected]
61
- with :
62
- args : ' --ignore-tests'
34
+ - uses : actions/checkout@v4
35
+ - name : install Rust
36
+ run : rustup toolchain install stable --profile minimal --component rustfmt,clippy --allow-downgrade
37
+ - name : cargo fmt
38
+ run : cargo fmt --check
39
+ - name : cargo clippy
40
+ run : cargo clippy --all-features -- --deny warnings
41
+ - name : install tarpaulin
42
+ uses : baptiste0928/cargo-install@v2
43
+ with :
44
+ crate : cargo-tarpaulin
45
+ - name : cargo tarpaulin
46
+ run : cargo tarpaulin --engine llvm --follow-exec --post-test-delay 10
47
+
63
48
bench :
64
49
runs-on : ubuntu-latest
65
50
steps :
66
- - uses : actions/checkout@v2
67
- - uses : actions-rs/toolchain@v1
68
- with :
69
- toolchain : nightly
70
- override : true
71
- - uses : actions-rs/cargo@v1
72
- with :
73
- command : bench
51
+ - uses : actions/checkout@v4
52
+ - name : install Rust
53
+ run : rustup toolchain install nightly --profile minimal
54
+ - name : cargo bench
55
+ run : cargo +nightly bench --all-features
0 commit comments