|
6 | 6 | check:
|
7 | 7 | name: Check
|
8 | 8 | runs-on: ubuntu-latest
|
9 |
| - strategy: |
10 |
| - matrix: |
11 |
| - rust: |
12 |
| - - 1.70.0 |
13 |
| - - stable |
14 |
| - - beta |
15 |
| - - nightly |
16 |
| - |
17 | 9 | steps:
|
18 | 10 | - name: Checkout sources
|
19 | 11 |
|
20 | 12 |
|
21 | 13 | - name: Install toolchain
|
22 | 14 | uses: dtolnay/rust-toolchain@master
|
23 | 15 | with:
|
24 |
| - toolchain: ${{ matrix.rust }} |
| 16 | + toolchain: 1.70.0 |
25 | 17 |
|
26 |
| - - name: Run cargo check |
27 |
| - if: matrix.rust != 'nightly' |
28 |
| - run: cargo check --all-features |
| 18 | + - name: Cache |
| 19 | + uses: Swatinem/rust-cache@v2 |
29 | 20 |
|
30 |
| - - name: Run cargo check (nightly) |
31 |
| - if: matrix.rust == 'nightly' |
32 |
| - continue-on-error: true |
33 |
| - run: cargo check --all-features |
| 21 | + - name: Run cargo check |
| 22 | + run: cargo check --all-features --examples --tests |
34 | 23 |
|
35 | 24 | test:
|
36 |
| - needs: [check] |
37 | 25 | name: Test Suite
|
38 | 26 | runs-on: ubuntu-latest
|
39 |
| - strategy: |
40 |
| - matrix: |
41 |
| - rust: |
42 |
| - - 1.70.0 |
43 |
| - - stable |
44 |
| - - beta |
45 |
| - - nightly |
46 | 27 | steps:
|
47 | 28 | - name: Checkout sources
|
48 | 29 |
|
49 | 30 |
|
50 | 31 | - name: Install toolchain
|
51 | 32 | uses: dtolnay/rust-toolchain@master
|
52 | 33 | with:
|
53 |
| - toolchain: ${{ matrix.rust }} |
54 |
| - |
55 |
| - - name: Run cargo test |
56 |
| - if: matrix.rust != 'nightly' && matrix.rust != '1.56.1' |
57 |
| - run: cargo test --all-features |
| 34 | + toolchain: 1.70.0 |
58 | 35 |
|
59 |
| - - name: Run cargo test (nightly) |
60 |
| - if: matrix.rust == '1.66.0' |
61 |
| - continue-on-error: true |
62 |
| - run: cargo test --tests --all-features |
| 36 | + - name: Cache |
| 37 | + uses: Swatinem/rust-cache@v2 |
63 | 38 |
|
64 |
| - - name: Run cargo test (nightly) |
65 |
| - if: matrix.rust == 'nightly' |
66 |
| - continue-on-error: true |
| 39 | + - name: Run cargo test |
67 | 40 | run: cargo test --all-features
|
68 | 41 |
|
69 | 42 | fmt:
|
70 | 43 | needs: [check]
|
71 | 44 | name: Rustfmt
|
72 | 45 | runs-on: ubuntu-latest
|
73 |
| - strategy: |
74 |
| - matrix: |
75 |
| - rust: |
76 |
| - - stable |
77 |
| - - beta |
78 | 46 | steps:
|
79 | 47 | - name: Checkout sources
|
80 | 48 |
|
81 | 49 |
|
82 | 50 | - name: Install toolchain
|
83 | 51 | uses: dtolnay/rust-toolchain@master
|
84 | 52 | with:
|
85 |
| - toolchain: ${{ matrix.rust }} |
| 53 | + toolchain: 1.70.0 |
86 | 54 | components: rustfmt
|
87 | 55 |
|
88 | 56 | - name: Run cargo fmt
|
| 57 | + continue-on-error: ${{ matrix.rust == 'beta' }} |
89 | 58 | run: cargo fmt --all -- --check
|
90 | 59 |
|
91 | 60 | clippy:
|
92 | 61 | needs: [check]
|
93 | 62 | name: Clippy
|
94 | 63 | runs-on: ubuntu-latest
|
95 |
| - strategy: |
96 |
| - matrix: |
97 |
| - rust: |
98 |
| - - 1.70.0 |
99 |
| - - 1.73.0 |
100 | 64 | steps:
|
101 | 65 | - name: Checkout sources
|
102 | 66 |
|
103 | 67 |
|
104 | 68 | - name: Install toolchain
|
105 | 69 | uses: dtolnay/rust-toolchain@master
|
106 | 70 | with:
|
107 |
| - toolchain: ${{ matrix.rust }} |
| 71 | + toolchain: 1.70.0 |
108 | 72 | components: clippy
|
109 | 73 |
|
| 74 | + - name: Cache |
| 75 | + uses: Swatinem/rust-cache@v2 |
| 76 | + |
110 | 77 | - name: Run cargo clippy
|
111 | 78 | run: cargo clippy --all-targets --all-features -- -D warnings
|
112 | 79 |
|
113 |
| - check-examples: |
114 |
| - name: Check examples |
115 |
| - needs: [check] |
116 |
| - runs-on: ubuntu-latest |
117 |
| - strategy: |
118 |
| - matrix: |
119 |
| - rust: |
120 |
| - - 1.70.0 |
121 |
| - - 1.73.0 |
122 |
| - |
123 |
| - steps: |
124 |
| - - name: Checkout sources |
125 |
| - |
126 |
| - |
127 |
| - - name: Install toolchain |
128 |
| - uses: dtolnay/rust-toolchain@master |
129 |
| - with: |
130 |
| - toolchain: ${{ matrix.rust }} |
131 |
| - components: clippy |
132 |
| - |
133 |
| - - name: Run cargo check |
134 |
| - run: cargo check --examples |
135 |
| - |
0 commit comments