Run default and diagnostics tests independently of Clippy

This commit is contained in:
feanorsun
2026-11-26 13:32:36 +08:00
parent 85d5641673
commit 2ee5d5fd04

View File

@ -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
}