ci: combine gateway clippy and nextest jobs

This commit is contained in:
zhefox
2026-06-23 14:06:43 +08:00
parent ba65c96c74
commit 3472bb75e7
+16 -62
View File
@@ -70,7 +70,7 @@ jobs:
env:
RUSTC_WRAPPER: sccache
SCCACHE_GHA_ENABLED: "true"
run: cargo clippy -p aether-gateway --all-targets -- -D warnings
run: cargo clippy -p aether-gateway --lib --bins --examples -- -D warnings
- name: Show sccache stats
if: always()
@@ -165,50 +165,8 @@ jobs:
exit 1
fi
test_gateway_shard:
name: Test Gateway Lib Shard (${{ matrix.shard }}/3)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3]
steps:
- uses: actions/checkout@v5
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Show Rust toolchain
run: rustup show active-toolchain
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
shared-key: rust-ci-${{ runner.os }}
workspaces: . -> target
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.9
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Test
env:
RUSTC_WRAPPER: sccache
SCCACHE_GHA_ENABLED: "true"
RUST_MIN_STACK: "16777216"
run: cargo nextest run -p aether-gateway --lib --partition count:${{ matrix.shard }}/3
- name: Show sccache stats
if: always()
env:
RUSTC_WRAPPER: sccache
SCCACHE_GHA_ENABLED: "true"
run: sccache --show-stats
test_gateway_bin:
name: Test Gateway Bin
test_gateway:
name: Test (Gateway)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
@@ -228,14 +186,26 @@ jobs:
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.9
- name: Setup mold
uses: rui314/setup-mold@v1
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Test
- name: Test lib
env:
RUSTC_WRAPPER: sccache
SCCACHE_GHA_ENABLED: "true"
RUST_MIN_STACK: "16777216"
RUSTFLAGS: "-C link-arg=-fuse-ld=mold"
run: cargo nextest run -p aether-gateway --lib
- name: Test bin
env:
RUSTC_WRAPPER: sccache
SCCACHE_GHA_ENABLED: "true"
RUST_MIN_STACK: "16777216"
RUSTFLAGS: "-C link-arg=-fuse-ld=mold"
run: cargo nextest run -p aether-gateway --bin aether-gateway
- name: Show sccache stats
@@ -245,22 +215,6 @@ jobs:
SCCACHE_GHA_ENABLED: "true"
run: sccache --show-stats
test_gateway:
name: Test (Gateway)
runs-on: ubuntu-latest
needs:
- test_gateway_shard
- test_gateway_bin
if: ${{ always() }}
steps:
- name: Verify Gateway test shards
run: |
if [ "${{ needs.test_gateway_shard.result }}" != "success" ] || \
[ "${{ needs.test_gateway_bin.result }}" != "success" ]; then
echo "Gateway tests failed"
exit 1
fi
test_data:
name: Test (Data)
runs-on: ubuntu-latest