1414jobs :
1515 unitTests :
1616 name : " 🧪 Unit Tests: Webapp"
17- # 10 shards on 16x machines: webapp test throughput is limited per-machine (one
18- # docker daemon + disk absorbing all the per-file Postgres/ClickHouse container
19- # spin-up), so many machines beats few big ones - fewer/bigger (3x32) measured
20- # SLOWER than 10x8. The 16x (vs 8x) gives the fork pool the CPU headroom the 8x
21- # runners lacked. Setup overhead per machine is ~1 min on warm runners.
17+ # Webapp test throughput is limited per-machine (one docker daemon + disk absorbing
18+ # all the per-file Postgres/ClickHouse container spin-up), so many machines beats
19+ # few big ones - fewer/bigger (3x32) measured slower than 10x8. The 16x (vs 8x)
20+ # gives the fork pool the CPU headroom the 8x runners lacked.
2221 runs-on : warp-ubuntu-latest-x64-16x
2322 strategy :
2423 # one flaky shard shouldn't cancel its siblings - lets us re-run only the failed shard
2524 fail-fast : false
2625 matrix :
27- shardIndex : [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
28- shardTotal : [12 ]
26+ shardIndex : [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 ]
27+ shardTotal : [24 ]
2928 env :
3029 DOCKERHUB_USERNAME : ${{ secrets.DOCKERHUB_USERNAME }}
3130 SHARD_INDEX : ${{ matrix.shardIndex }}
6968 version : 10.33.2
7069
7170 - name : ⎔ Setup node
72- uses : actions /setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
71+ uses : WarpBuilds /setup-node@bc639b444d583175926b588962199c247d23e8d3 # v6
7372 with :
7473 node-version : 24.18.0
7574 cache : " pnpm"
8584 if : ${{ !env.DOCKERHUB_USERNAME }}
8685 run : echo "DockerHub login skipped because secrets are not available."
8786
88- - name : 🐳 Pre-pull testcontainer images
87+ - name : 📥 Prepare deps and testcontainer images
8988 run : |
90- # Retry each pull - DockerHub registry timeouts are a recurring transient CI flake.
89+ # Pull images concurrently with dependency installation. Retry each pull because
90+ # DockerHub registry timeouts are a recurring transient CI flake.
9191 pull() {
9292 for attempt in 1 2 3; do
9393 docker pull "$1" && return 0
@@ -97,18 +97,41 @@ jobs:
9797 echo "::error::docker pull $1 failed after 3 attempts"
9898 return 1
9999 }
100- echo "Pre-pulling Docker images with authenticated session..."
101- pull postgres:14
102- pull postgres:17
103- pull clickhouse/clickhouse-server:26.2.19.43-alpine@sha256:c6ad6a7eb2fb5999df3adfb8b69a0c7222c68fa9b8f6b04a088564ebbc959251
104- pull redis:7.2
105- pull testcontainers/ryuk:0.14.0
106- pull electricsql/electric:1.2.4@sha256:20da3d0b0e74926c5623392db67fd56698b9e374c4aeb6cb5cadeb8fea171c36
107- pull minio/minio:latest
108- echo "Image pre-pull complete"
109-
110- - name : 📥 Download deps
111- run : pnpm install --frozen-lockfile
100+
101+ pull_images() {
102+ local pids=()
103+ local failed=0
104+ for image in \
105+ postgres:14 \
106+ postgres:17 \
107+ clickhouse/clickhouse-server:26.2.19.43-alpine@sha256:c6ad6a7eb2fb5999df3adfb8b69a0c7222c68fa9b8f6b04a088564ebbc959251 \
108+ redis:7.2 \
109+ testcontainers/ryuk:0.14.0 \
110+ electricsql/electric:1.2.4@sha256:20da3d0b0e74926c5623392db67fd56698b9e374c4aeb6cb5cadeb8fea171c36 \
111+ minio/minio:latest
112+ do
113+ pull "$image" &
114+ pids+=("$!")
115+ done
116+ for pid in "${pids[@]}"; do
117+ if ! wait "$pid"; then
118+ failed=1
119+ fi
120+ done
121+ return "$failed"
122+ }
123+
124+ echo "Installing dependencies and pre-pulling Docker images..."
125+ pull_images &
126+ pull_pid=$!
127+ install_status=0
128+ pnpm install --frozen-lockfile || install_status=$?
129+ pull_status=0
130+ wait "$pull_pid" || pull_status=$?
131+ if (( install_status != 0 || pull_status != 0 )); then
132+ exit 1
133+ fi
134+ echo "Dependency install and image pre-pull complete"
112135
113136 - name : 📀 Generate Prisma Client
114137 run : pnpm run generate
0 commit comments