Skip to content

Commit ce16942

Browse files
committed
improvement(ci): refresh integration shard balance for GitHub runners
1 parent 9a66fee commit ce16942

2 files changed

Lines changed: 262 additions & 259 deletions

File tree

‎.github/workflows/checks.yml‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ jobs:
105105
--health-interval 5s
106106
--health-timeout 5s
107107
--health-retries 10
108-
# Only push/1 runs the PostgreSQL 16 step below; an empty image skips the service elsewhere.
108+
# Only push/6 runs the PostgreSQL 16 step below; an empty image skips the service elsewhere.
109109
postgres-legacy:
110-
image: ${{ matrix.provision == 'push' && matrix.shard == 1 && 'postgres:16-alpine' || '' }}
110+
image: ${{ matrix.provision == 'push' && matrix.shard == 6 && 'postgres:16-alpine' || '' }}
111111
env:
112112
POSTGRES_USER: postgres
113113
POSTGRES_PASSWORD: postgres
@@ -143,13 +143,16 @@ jobs:
143143
bun run db:${{ matrix.provision }}
144144
145145
- name: Verify migration replay is a no-op
146-
if: matrix.provision == 'migrate' && matrix.shard == 1
146+
if: matrix.provision == 'migrate' && matrix.shard == 6
147147
working-directory: packages/db
148148
run: bun run db:migrate
149149

150150
- name: Run packages/db integration tests
151151
working-directory: packages/db
152-
run: bun run test --mode integration --shard=${{ matrix.shard }}/8
152+
# Oppose the longest database shard and the longest application shard.
153+
env:
154+
SHARD: ${{ matrix.shard }}
155+
run: bun run test --mode integration --shard=$((9 - SHARD))/8
153156

154157
- name: Run apps/sim integration tests
155158
working-directory: apps/sim
@@ -159,12 +162,12 @@ jobs:
159162
run: bun run test --mode integration --shard=${{ matrix.shard }}/8
160163

161164
- name: Run apps/realtime integration tests
162-
if: matrix.shard == 1
165+
if: matrix.shard == 6
163166
working-directory: apps/realtime
164167
run: bun run test --mode integration
165168

166169
- name: Verify cumulative billing timeout recovery on PostgreSQL 16
167-
if: matrix.provision == 'push' && matrix.shard == 1
170+
if: matrix.provision == 'push' && matrix.shard == 6
168171
working-directory: apps/sim
169172
env:
170173
TEST_DATABASE_URL: postgresql://postgres:postgres@127.0.0.1:5433/sim_test

0 commit comments

Comments
 (0)