mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-12-01 21:05:42 +09:00
Run Builder E2E in nine measured shards
This commit is contained in:
1 parent
668bbc2ec7
commit
9c75f6388d
31 files changed
+19
-14
No files matched your search
@@ -28,7 +28,7 @@ runs:
|
||||
shards=$(pnpm --dir apps/builder exec tsx ./e2e/print-shards.ts)
|
||||
SHARDS="$shards" node -e '
|
||||
const shards = JSON.parse(process.env.SHARDS);
|
||||
if (shards.length !== 10 || shards.some(({ shard, partition }, index) =>
|
||||
if (shards.length !== 9 || shards.some(({ shard, partition }, index) =>
|
||||
shard !== `shard-${index + 1}` || partition !== "")) {
|
||||
throw new Error("Builder E2E shard matrix changed; update the workflow matrix before running CI.");
|
||||
}
|
||||
|
||||
@@ -63,12 +63,20 @@ runs:
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
for attempt in {1..84}; do
|
||||
wait_started_at=$SECONDS
|
||||
deadline=$((wait_started_at + 7 * 60))
|
||||
while (( SECONDS < deadline )); do
|
||||
available=$(gh api "repos/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID/artifacts?name=builder-e2e-build" --jq '.artifacts | max_by(.id) | .expired == false')
|
||||
if [ "$available" = true ]; then
|
||||
exit 0
|
||||
fi
|
||||
sleep 5
|
||||
# Check more often during normal builds without increasing the
|
||||
# maximum number of requests if the build never uploads.
|
||||
if (( SECONDS - wait_started_at < 40 )); then
|
||||
sleep 2
|
||||
else
|
||||
sleep 6
|
||||
fi
|
||||
done
|
||||
echo "Builder E2E build artifact was not uploaded within 7 minutes" >&2
|
||||
exit 1
|
||||
|
||||
@@ -215,7 +215,6 @@ jobs:
|
||||
- shard-7
|
||||
- shard-8
|
||||
- shard-9
|
||||
- shard-10
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
Reference in new issue
Block a user