Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

⚡️ ci(test): split Test Server into three shards (#22239)

YuTengjing89a15862aee5
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index adcf927fed8..62a97ef133e 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -383,11 +383,14 @@ jobs:
echo "rules and fixtures unchanged; skipping calibration"
fi
+ # Test Server is usually the last Test CI job to finish. A 2 vs 3 shard run on the
+ # same commit cut its slowest shard from 17-19 to 12-13 min; a 4th shard would only
+ # wait on Test App instead.
test-server:
strategy:
matrix:
- shard: [1, 2]
- name: Test Server (shard ${{ matrix.shard }}/2)
+ shard: [1, 2, 3]
+ name: Test Server (shard ${{ matrix.shard }}/3)
runs-on: ubuntu-latest
@@ -409,7 +412,7 @@ jobs:
run: pnpm install
- name: Test Server Coverage
- run: bunx vitest --coverage --silent='passed-only' --reporter=default --coverage.reportsDirectory=./apps/server/coverage --project server --shard=${{ matrix.shard }}/2
+ run: bunx vitest --coverage --silent='passed-only' --reporter=default --coverage.reportsDirectory=./apps/server/coverage --project server --shard=${{ matrix.shard }}/3
# See the App shard above: uploaded together by `upload-sharded-coverage`.
- name: Save Server Coverage shard
@@ -469,7 +472,7 @@ jobs:
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
- files: ./coverage-shards/coverage-server-1/lcov.info,./coverage-shards/coverage-server-2/lcov.info
+ files: ./coverage-shards/coverage-server-1/lcov.info,./coverage-shards/coverage-server-2/lcov.info,./coverage-shards/coverage-server-3/lcov.info
disable_search: true
flags: server
name: server