From d796f97d8f3623a40469541ad4700cdd953877c2 Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Fri, 22 Nov 2024 07:45:58 -0800 Subject: [PATCH 1/2] ci: cargo update and test in the test job One fewer set of jobs to schedule and launch --- .github/workflows/tests.yml | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e33590a1..0dfa8476 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -115,6 +115,9 @@ jobs: - name: Check clippy # TODO: Deny warnings run: cargo clippy --all-targets --all-features + - run: cargo update + - name: Test after cargo update + run: cargo test --workspace minimal-versions: needs: [quick-test] @@ -134,24 +137,6 @@ jobs: tool: nextest - run: cargo test - # Run `cargo update` and check the tests still pass - maximal-versions: - needs: [quick-test] - strategy: - matrix: - os: [macOS-latest, ubuntu-latest, windows-latest] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@nightly - - uses: Swatinem/rust-cache@v2 - - run: cargo update - - uses: taiki-e/install-action@v2 - name: Install nextest using install-action - with: - tool: nextest - - run: cargo test - tests-from-tarball: needs: [quick-test] strategy: @@ -303,7 +288,6 @@ jobs: quick-test, test, minimal-versions, - maximal-versions, tests-from-tarball, install, pr-mutants, From e3b31670bc254f13c431a2511a22a741a3070c71 Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Fri, 22 Nov 2024 07:48:04 -0800 Subject: [PATCH 2/2] ci: Also run minimal versions in the tests job Might also be faster and need fewer jobs --- .github/workflows/tests.yml | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0dfa8476..6b3c6cb5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -118,24 +118,12 @@ jobs: - run: cargo update - name: Test after cargo update run: cargo test --workspace - - minimal-versions: - needs: [quick-test] - strategy: - matrix: - os: [macOS-latest, ubuntu-latest, windows-latest] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@nightly - - uses: Swatinem/rust-cache@v2 - - run: cargo +nightly -Zdirect-minimal-versions update - - run: cargo build --all-targets - - uses: taiki-e/install-action@v2 - name: Install nextest using install-action - with: - tool: nextest - - run: cargo test + - name: Downgrade to minimal versions + if: matrix.version == 'nightly' + run: cargo +nightly -Zdirect-minimal-versions update + - name: Test on minimal versions + if: matrix.version == 'nightly' + run: cargo test tests-from-tarball: needs: [quick-test] @@ -287,7 +275,6 @@ jobs: [ quick-test, test, - minimal-versions, tests-from-tarball, install, pr-mutants,