From 54780b944dbed6ebd8d7b04265b212646c204d6f Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Tue, 3 Dec 2024 09:41:40 -0500 Subject: [PATCH] CI: Try using only MSRV in tests & lints --- .github/workflows/ci.yml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7152ca7..e580cd2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,16 +2,18 @@ name: CI on: pull_request: push: - branches: - - master + #branches: + # - master +env: + MSRV: "1.70" jobs: - check-msrv: + check: name: Check strategy: matrix: toolchain: - - "1.70" + - MSRV - stable runs-on: ubuntu-latest steps: @@ -27,7 +29,7 @@ jobs: - name: Install toolchain uses: dtolnay/rust-toolchain@master with: - toolchain: ${{ matrix.toolchain}} + toolchain: ${{ matrix.toolchain == 'MSRV' && env.MSRV || 'stable' }} - uses: Swatinem/rust-cache@v2 @@ -46,8 +48,10 @@ jobs: - name: Remove the rust-toolchain.toml run: rm rust-toolchain.toml - - name: Install stable toolchain - uses: dtolnay/rust-toolchain@stable + - name: Install MSRV toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: "${{ env.MSRV }}" - uses: Swatinem/rust-cache@v2 @@ -67,9 +71,10 @@ jobs: - name: Remove the rust-toolchain.toml run: rm rust-toolchain.toml - - name: Install stable toolchain - uses: dtolnay/rust-toolchain@stable + - name: Install MSRV toolchain + uses: dtolnay/rust-toolchain@master with: + toolchain: "${{ env.MSRV }}" components: rustfmt, clippy - uses: Swatinem/rust-cache@v2