History

Make the test suite parallel-safe and speed up CI (#1273)

* Make self-host tests CI-safe * Await cloud db teardown * Give local e2e boots more headroom * Keep main CI runs alive * Cache CI dependencies and image layers * Wait for recorded introspection requests in graphql plugin tests * Size self-host test budget for loaded runners * Probe test http servers for readiness before use * Die on recorder wait timeout instead of typing a string error * Type the recorder wait timeout as a tagged error * Update e2e locators for the integration copy renames * Keep stale data rendered while a refresh is waiting * Guard create-org input against hydration clobbering * Match the new sign-in heading in the selfhost callback test

Rhys Sullivan committed 4 months ago

Commit 8652c991 parent 9c7e4a627 files · +252 −102Browse files

Showing the changes to .github (1 of 27 files). Show all

Unified · Split

.github/workflows/ci.yml+74−2
@@ -7,8 +7,8 @@ on: · 6 unmodified lines
7 - main7 - main
8 8
9concurrency:9concurrency:
10 group: ci-${{ github.ref }}10 group: ci-${{ github.event_name == 'push' && format('{0}-{1}', github.ref, github.sha) || github.ref }}
11 cancel-in-progress: true11 cancel-in-progress: ${{ github.event_name == 'pull_request' }}
12 12
13jobs:13jobs:
14 format:14 format:
@@ -21,6 +21,14 @@ jobs: · 6 unmodified lines
21 with:21 with:
22 bun-version: 1.3.1122 bun-version: 1.3.11
23 23
24 - name: Cache Bun package cache
25 uses: actions/cache@v4
26 with:
27 path: ~/.bun/install/cache
28 key: ${{ runner.os }}-bun-1.3.11-${{ hashFiles('bun.lock') }}
29 restore-keys: |
30 ${{ runner.os }}-bun-1.3.11-
31
24 - run: bun install --frozen-lockfile32 - run: bun install --frozen-lockfile
25 33
26 - run: bun run format:check34 - run: bun run format:check
@@ -35,6 +43,14 @@ jobs: · 8 unmodified lines
35 with:43 with:
36 bun-version: 1.3.1144 bun-version: 1.3.11
37 45
46 - name: Cache Bun package cache
47 uses: actions/cache@v4
48 with:
49 path: ~/.bun/install/cache
50 key: ${{ runner.os }}-bun-1.3.11-${{ hashFiles('bun.lock') }}
51 restore-keys: |
52 ${{ runner.os }}-bun-1.3.11-
53
38 - run: bun install --frozen-lockfile54 - run: bun install --frozen-lockfile
39 55
40 - run: bun run lint56 - run: bun run lint
@@ -49,6 +65,14 @@ jobs: · 8 unmodified lines
49 with:65 with:
50 bun-version: 1.3.1166 bun-version: 1.3.11
51 67
68 - name: Cache Bun package cache
69 uses: actions/cache@v4
70 with:
71 path: ~/.bun/install/cache
72 key: ${{ runner.os }}-bun-1.3.11-${{ hashFiles('bun.lock') }}
73 restore-keys: |
74 ${{ runner.os }}-bun-1.3.11-
75
52 - run: bun install --frozen-lockfile76 - run: bun install --frozen-lockfile
53 77
54 - run: bun run typecheck78 - run: bun run typecheck
@@ -56,6 +80,8 @@ jobs: · 1 unmodified line
56 test:80 test:
57 name: Test81 name: Test
58 runs-on: ubuntu-latest82 runs-on: ubuntu-latest
83 env:
84 TURBO_TEST_CONCURRENCY: 3
59 steps:85 steps:
60 - uses: actions/checkout@v486 - uses: actions/checkout@v4
61 87
@@ -63,6 +89,14 @@ jobs: · 1 unmodified line
63 with:89 with:
64 bun-version: 1.3.1190 bun-version: 1.3.11
65 91
92 - name: Cache Bun package cache
93 uses: actions/cache@v4
94 with:
95 path: ~/.bun/install/cache
96 key: ${{ runner.os }}-bun-1.3.11-${{ hashFiles('bun.lock') }}
97 restore-keys: |
98 ${{ runner.os }}-bun-1.3.11-
99
66 # apps/cloud's test script invokes `node` directly; undici 8.x (pulled100 # apps/cloud's test script invokes `node` directly; undici 8.x (pulled
67 # in by @cloudflare/vitest-pool-workers) calls webidl.markAsUncloneable101 # in by @cloudflare/vitest-pool-workers) calls webidl.markAsUncloneable
68 # which only exists in Node 22.10+. Pin a known-good runtime.102 # which only exists in Node 22.10+. Pin a known-good runtime.
@@ -105,6 +139,14 @@ jobs: · 36 unmodified lines
105 with:139 with:
106 bun-version: 1.3.11140 bun-version: 1.3.11
107 141
142 - name: Cache Bun package cache
143 uses: actions/cache@v4
144 with:
145 path: ~/.bun/install/cache
146 key: ${{ runner.os }}-bun-1.3.11-${{ hashFiles('bun.lock') }}
147 restore-keys: |
148 ${{ runner.os }}-bun-1.3.11-
149
108 # The dev stacks spawn Node sidecars (vite/workerd tooling); pin the150 # The dev stacks spawn Node sidecars (vite/workerd tooling); pin the
109 # same known-good runtime the unit-test job uses.151 # same known-good runtime the unit-test job uses.
110 - uses: actions/setup-node@v4152 - uses: actions/setup-node@v4
@@ -113,6 +155,12 @@ jobs: · 2 unmodified lines
113 155
114 - run: bun install --frozen-lockfile156 - run: bun install --frozen-lockfile
115 157
158 - name: Cache Playwright browsers
159 uses: actions/cache@v4
160 with:
161 path: ~/.cache/ms-playwright
162 key: ${{ runner.os }}-playwright-1.60.0
163
116 # Install from e2e so bunx resolves ITS pinned playwright (the version164 # Install from e2e so bunx resolves ITS pinned playwright (the version
117 # the tests run against) rather than floating to the latest.165 # the tests run against) rather than floating to the latest.
118 - name: Install Playwright Chromium166 - name: Install Playwright Chromium
@@ -152,6 +200,14 @@ jobs: · 33 unmodified lines
152 with:200 with:
153 bun-version: 1.3.11201 bun-version: 1.3.11
154 202
203 - name: Cache Bun package cache
204 uses: actions/cache@v4
205 with:
206 path: ~/.bun/install/cache
207 key: ${{ runner.os }}-bun-1.3.11-${{ hashFiles('bun.lock') }}
208 restore-keys: |
209 ${{ runner.os }}-bun-1.3.11-
210
155 # The local scenarios boot a real `executor web` (which spawns a Node211 # The local scenarios boot a real `executor web` (which spawns a Node
156 # sidecar) and some drive a browser, so pin Node 22 and install Chromium.212 # sidecar) and some drive a browser, so pin Node 22 and install Chromium.
157 - uses: actions/setup-node@v4213 - uses: actions/setup-node@v4
@@ -160,6 +216,12 @@ jobs: · 2 unmodified lines
160 216
161 - run: bun install --frozen-lockfile217 - run: bun install --frozen-lockfile
162 218
219 - name: Cache Playwright browsers
220 uses: actions/cache@v4
221 with:
222 path: ~/.cache/ms-playwright
223 key: ${{ runner.os }}-playwright-1.60.0
224
163 # `chromium` and the new `chromium-headless-shell` ship as separate225 # `chromium` and the new `chromium-headless-shell` ship as separate
164 # downloads; the browser-driven scenarios launch the headless shell.226 # downloads; the browser-driven scenarios launch the headless shell.
165 # Install from e2e so bunx resolves ITS pinned playwright (the version the227 # Install from e2e so bunx resolves ITS pinned playwright (the version the
@@ -190,6 +252,14 @@ jobs: · 24 unmodified lines
190 with:252 with:
191 bun-version: 1.3.11253 bun-version: 1.3.11
192 254
255 - name: Cache Bun package cache
256 uses: actions/cache@v4
257 with:
258 path: ~/.bun/install/cache
259 key: ${{ runner.os }}-bun-1.3.11-${{ hashFiles('bun.lock') }}
260 restore-keys: |
261 ${{ runner.os }}-bun-1.3.11-
262
193 - run: bun install --frozen-lockfile263 - run: bun install --frozen-lockfile
194 264
195 - name: Build web app265 - name: Build web app
@@ -221,3 +291,5 @@ jobs: · 25 unmodified lines
221 file: apps/host-selfhost/Dockerfile291 file: apps/host-selfhost/Dockerfile
222 push: false292 push: false
223 tags: executor-selfhost:ci293 tags: executor-selfhost:ci
294 cache-from: type=gha
295 cache-to: type=gha,mode=max