@@ -11,13 +11,78 @@ permissions:
11
11
12
12
env :
13
13
CARGO_TERM_COLOR : always
14
+ # Minimum supported Rust version (MSRV)
15
+ ACTIONS_MSRV_TOOLCHAIN : 1.49.0
16
+ # Pinned toolchain for linting
17
+ ACTIONS_LINTS_TOOLCHAIN : 1.53.0
14
18
15
19
jobs :
16
- build :
20
+ tests-stable :
21
+ name : " Tests, stable toolchain"
17
22
runs-on : ubuntu-latest
18
23
steps :
19
- - uses : actions/checkout@v2
20
- - name : Build
21
- run : cargo build --verbose
22
- - name : Run tests
23
- run : cargo test --verbose
24
+ - name : Checkout repository
25
+ uses : actions/checkout@v2
26
+ - name : Install toolchain
27
+ uses : actions-rs/toolchain@v1
28
+ with :
29
+ toolchain : stable
30
+ default : true
31
+ - name : cargo build
32
+ run : cargo build
33
+ - name : cargo test
34
+ run : cargo test
35
+ tests-msrv :
36
+ name : " Tests, minimum supported toolchain"
37
+ runs-on : ubuntu-latest
38
+ steps :
39
+ - name : Checkout repository
40
+ uses : actions/checkout@v2
41
+ - name : Install toolchain
42
+ uses : actions-rs/toolchain@v1
43
+ with :
44
+ toolchain : ${{ env['ACTIONS_MSRV_TOOLCHAIN'] }}
45
+ default : true
46
+ - name : cargo build
47
+ run : cargo build
48
+ - name : cargo test
49
+ run : cargo test
50
+ lints :
51
+ name : " Lints, pinned toolchain"
52
+ runs-on : ubuntu-latest
53
+ steps :
54
+ - name : Checkout repository
55
+ uses : actions/checkout@v2
56
+ - name : Install toolchain
57
+ uses : actions-rs/toolchain@v1
58
+ with :
59
+ toolchain : ${{ env['ACTIONS_LINTS_TOOLCHAIN'] }}
60
+ default : true
61
+ components : rustfmt, clippy
62
+ - name : cargo fmt (check)
63
+ run : cargo fmt -- --check -l
64
+ - name : cargo clippy (warnings)
65
+ run : cargo clippy -- -D warnings
66
+ - name : cargo build
67
+ run : cargo build
68
+ tests-other-channels :
69
+ name : " Tests, unstable toolchain"
70
+ runs-on : ubuntu-latest
71
+ continue-on-error : true
72
+ strategy :
73
+ matrix :
74
+ channel :
75
+ - beta
76
+ - nightly
77
+ steps :
78
+ - name : Checkout repository
79
+ uses : actions/checkout@v2
80
+ - name : Install toolchain
81
+ uses : actions-rs/toolchain@v1
82
+ with :
83
+ toolchain : ${{ matrix.channel }}
84
+ default : true
85
+ - name : cargo build
86
+ run : cargo build
87
+ - name : cargo test
88
+ run : cargo test
0 commit comments