From 2ee5d5fd041f810cf56a8a0edbfd5dd86fc76cda Mon Sep 17 00:00:00 2001 From: feanorsun <59348287+feanorsun@users.noreply.github.com> Date: Thu, 26 Nov 2026 13:32:36 +0800 Subject: [PATCH] Run default and diagnostics tests independently of Clippy --- .github/workflows/ci.yml | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 80e6a35..018b470 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,8 @@ env: CARGO_TERM_COLOR: always jobs: - check: + clippy: + name: Clippy runs-on: windows-latest timeout-minutes: 60 steps: @@ -28,6 +29,38 @@ jobs: run: cargo clippy --workspace --all-targets --locked -- -D warnings - name: Clippy, diagnostics build run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings + + test-default: + name: Default tests + runs-on: windows-latest + timeout-minutes: 60 + steps: + - uses: actions/checkout@v5 + - run: rustup toolchain install + - uses: Swatinem/rust-cache@v2 # Includes xtask's repository_passes_policy, the asset-policy check. - - name: Tests - run: cargo test --workspace --locked + - run: cargo test --workspace --locked + + test-diagnostics: + name: Diagnostics tests + runs-on: windows-latest + timeout-minutes: 60 + steps: + - uses: actions/checkout@v5 + - run: rustup toolchain install + - uses: Swatinem/rust-cache@v2 + - run: cargo test --workspace --all-features --locked -- --test-threads=1 + + check: + needs: [clippy, test-default, test-diagnostics] + if: always() + runs-on: windows-latest + timeout-minutes: 60 + steps: + - name: Require all three jobs to pass + run: | + if ('${{ needs.clippy.result }}' -ne 'success' -or + '${{ needs.test-default.result }}' -ne 'success' -or + '${{ needs.test-diagnostics.result }}' -ne 'success') { + exit 1 + }