Skip to content

Commit 54780b9

Browse files
committed
CI: Try using only MSRV in tests & lints
1 parent c033d2e commit 54780b9

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@ name: CI
22
on:
33
pull_request:
44
push:
5-
branches:
6-
- master
5+
#branches:
6+
# - master
77

8+
env:
9+
MSRV: "1.70"
810
jobs:
9-
check-msrv:
11+
check:
1012
name: Check
1113
strategy:
1214
matrix:
1315
toolchain:
14-
- "1.70"
16+
- MSRV
1517
- stable
1618
runs-on: ubuntu-latest
1719
steps:
@@ -27,7 +29,7 @@ jobs:
2729
- name: Install toolchain
2830
uses: dtolnay/rust-toolchain@master
2931
with:
30-
toolchain: ${{ matrix.toolchain}}
32+
toolchain: ${{ matrix.toolchain == 'MSRV' && env.MSRV || 'stable' }}
3133

3234
- uses: Swatinem/rust-cache@v2
3335

@@ -46,8 +48,10 @@ jobs:
4648
- name: Remove the rust-toolchain.toml
4749
run: rm rust-toolchain.toml
4850

49-
- name: Install stable toolchain
50-
uses: dtolnay/rust-toolchain@stable
51+
- name: Install MSRV toolchain
52+
uses: dtolnay/rust-toolchain@master
53+
with:
54+
toolchain: "${{ env.MSRV }}"
5155

5256
- uses: Swatinem/rust-cache@v2
5357

@@ -67,9 +71,10 @@ jobs:
6771
- name: Remove the rust-toolchain.toml
6872
run: rm rust-toolchain.toml
6973

70-
- name: Install stable toolchain
71-
uses: dtolnay/rust-toolchain@stable
74+
- name: Install MSRV toolchain
75+
uses: dtolnay/rust-toolchain@master
7276
with:
77+
toolchain: "${{ env.MSRV }}"
7378
components: rustfmt, clippy
7479

7580
- uses: Swatinem/rust-cache@v2

0 commit comments

Comments
 (0)