77 - main
88
99concurrency :
10- group : ci-${{ github.ref }}
11- cancel-in-progress : true
10+ group : ci-${{ github.event_name == 'push' && format('{0}-{1}', github.ref, github.sha) || github. ref }}
11+ cancel-in-progress : ${{ github.event_name == 'pull_request' }}
1212
1313jobs :
1414 format :
2121 with :
2222 bun-version : 1.3.11
2323
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+
2432 - run : bun install --frozen-lockfile
2533
2634 - run : bun run format:check
3543 with :
3644 bun-version : 1.3.11
3745
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+
3854 - run : bun install --frozen-lockfile
3955
4056 - run : bun run lint
@@ -49,20 +65,38 @@ jobs:
4965 with :
5066 bun-version : 1.3.11
5167
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+
5276 - run : bun install --frozen-lockfile
5377
5478 - run : bun run typecheck
5579
5680 test :
5781 name : Test
5882 runs-on : ubuntu-latest
83+ env :
84+ TURBO_TEST_CONCURRENCY : 3
5985 steps :
6086 - uses : actions/checkout@v4
6187
6288 - uses : oven-sh/setup-bun@v2
6389 with :
6490 bun-version : 1.3.11
6591
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+
66100 # apps/cloud's test script invokes `node` directly; undici 8.x (pulled
67101 # in by @cloudflare/vitest-pool-workers) calls webidl.markAsUncloneable
68102 # which only exists in Node 22.10+. Pin a known-good runtime.
@@ -105,6 +139,14 @@ jobs:
105139 with :
106140 bun-version : 1.3.11
107141
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+
108150 # The dev stacks spawn Node sidecars (vite/workerd tooling); pin the
109151 # same known-good runtime the unit-test job uses.
110152 - uses : actions/setup-node@v4
@@ -113,6 +155,12 @@ jobs:
113155
114156 - run : bun install --frozen-lockfile
115157
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+
116164 # Install from e2e so bunx resolves ITS pinned playwright (the version
117165 # the tests run against) rather than floating to the latest.
118166 - name : Install Playwright Chromium
@@ -152,6 +200,14 @@ jobs:
152200 with :
153201 bun-version : 1.3.11
154202
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+
155211 # The local scenarios boot a real `executor web` (which spawns a Node
156212 # sidecar) and some drive a browser, so pin Node 22 and install Chromium.
157213 - uses : actions/setup-node@v4
@@ -160,6 +216,12 @@ jobs:
160216
161217 - run : bun install --frozen-lockfile
162218
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+
163225 # `chromium` and the new `chromium-headless-shell` ship as separate
164226 # downloads; the browser-driven scenarios launch the headless shell.
165227 # Install from e2e so bunx resolves ITS pinned playwright (the version the
@@ -190,6 +252,14 @@ jobs:
190252 with :
191253 bun-version : 1.3.11
192254
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+
193263 - run : bun install --frozen-lockfile
194264
195265 - name : Build web app
@@ -221,3 +291,5 @@ jobs:
221291 file : apps/host-selfhost/Dockerfile
222292 push : false
223293 tags : executor-selfhost:ci
294+ cache-from : type=gha
295+ cache-to : type=gha,mode=max
0 commit comments