@@ -30,15 +30,15 @@ jobs:
3030 persist-credentials : false
3131 - uses : ./.github/actions/setup
3232 - name : Lint and types
33- run : pnpm check
33+ run : ./bin/ pnpm check
3434 # check already ran TypeScript; do not repeat pnpm build's typecheck.
3535 - name : Frontend build
36- run : pnpm exec vite build
36+ run : ./bin/ pnpm exec vite build
3737 - name : All Vitest tests
3838 env :
3939 # Bound contention between suites that sign and verify large fixtures.
4040 BUZZ_TEST_WORKERS : " 2"
41- run : node scripts/ci-test-report.mjs kind=vitest report=test-results/ci/vitest.json evidence=test-results/ci/vitest-timing.json title="Vitest tests" -- pnpm exec vitest run --reporter=default --reporter=json --outputFile=test-results/ci/vitest.json
41+ run : ./bin/ node scripts/ci-test-report.mjs kind=vitest report=test-results/ci/vitest.json evidence=test-results/ci/vitest-timing.json title="Vitest tests" -- ./bin/ pnpm exec vitest run --reporter=default --reporter=json --outputFile=test-results/ci/vitest.json
4242 - name : Vitest timing evidence
4343 if : always()
4444 uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
@@ -66,14 +66,14 @@ jobs:
6666 key : native
6767 save-if : ${{ github.event_name == 'push' }}
6868 - name : Rust formatting
69- run : cargo fmt --all --check
69+ run : ./bin/ cargo fmt --all --check
7070 - name : Rust lint
71- run : cargo clippy --workspace --locked --all-targets -- -D warnings
71+ run : ./bin/ cargo clippy --workspace --locked --all-targets -- -D warnings
7272 # --workspace includes Tauri, unlike the default Cargo member selection.
7373 - name : All Rust tests and doctests
74- run : cargo test --workspace --locked
74+ run : ./bin/ cargo test --workspace --locked
7575 - name : All Node integration tests
76- run : node --test tests/integration/*.test.mjs
76+ run : ./bin/ node --test tests/integration/*.test.mjs
7777
7878 windows-native :
7979 if : github.event_name == 'workflow_dispatch'
@@ -107,29 +107,32 @@ jobs:
107107 measurements :
108108 if : github.event_name != 'workflow_dispatch'
109109 name : Browser measurements
110- # https://playwright.dev/docs/ci#via-containers
110+ runs-on : ubuntu-24.04
111+ # Match package.json's Playwright version and pin immutable browser/OS layers.
111112 container :
112113 image : mcr.microsoft.com/playwright:v1.63.0-noble@sha256:eff16c30e6f3f4af0a03fa4b706120d5e9b0891c344a27d64559aff5900a4a27
113114 options : --init --ipc=host
114115 defaults :
115116 run :
116117 shell : bash
117- runs-on : ubuntu-24.04
118+ env :
119+ HOME : /root
118120 timeout-minutes : 15
119121 steps :
120122 - uses : actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
121123 with :
122124 persist-credentials : false
123- - uses : ./.github/actions/setup
124- # Container steps need their own Git trust for the host-owned checkout.
125- - name : Trust checked-out workspace
125+ - name : Trust this container workspace
126126 run : git config --global --add safe.directory "$GITHUB_WORKSPACE"
127+ - uses : ./.github/actions/setup
128+ with :
129+ browsers : " true"
127130 # Preserve Chromium -> WebKit measurement dependencies; never shard or
128131 # overlap the two measurement projects on this runner.
129132 - name : Serial Chromium and WebKit measurements
130133 env :
131134 PLAYWRIGHT_JSON_OUTPUT_FILE : test-results/browser/ci-report.json
132- run : node scripts/ci-test-report.mjs kind=playwright report=test-results/browser/ci-report.json evidence=test-results/browser/ci-timing.json title="Browser measurements" -- pnpm test:browser:ci --project '*-measurements' --workers=1 --reporter=list,json
135+ run : ./bin/ node scripts/ci-test-report.mjs kind=playwright report=test-results/browser/ci-report.json evidence=test-results/browser/ci-timing.json title="Browser measurements" -- ./bin/ pnpm test:browser:ci --project '*-measurements' --workers=1 --reporter=list,json
133136 # Cases tagged @classic-scrollbars need Chromium's platform scrollbars,
134137 # which Linux always draws as classic ones. One file cannot join the
135138 # six-way engine matrix (empty shards are errors), so it runs here, and
@@ -138,7 +141,7 @@ jobs:
138141 - name : Chromium classic-scrollbar layout
139142 env :
140143 PLAYWRIGHT_JSON_OUTPUT_FILE : test-results/browser-classic-scrollbars/ci-report.json
141- run : node scripts/ci-test-report.mjs kind=playwright report=test-results/browser-classic-scrollbars/ci-report.json evidence=test-results/browser-classic-scrollbars/ci-timing.json title="Browser classic scrollbars" -- pnpm test:browser:ci --project chromium-classic-scrollbars --no-deps --reporter=list,json
144+ run : ./bin/ node scripts/ci-test-report.mjs kind=playwright report=test-results/browser-classic-scrollbars/ci-report.json evidence=test-results/browser-classic-scrollbars/ci-timing.json title="Browser classic scrollbars" -- ./bin/ pnpm test:browser:ci --project chromium-classic-scrollbars --no-deps --reporter=list,json
142145 - name : Measurement evidence
143146 if : always()
144147 uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
@@ -154,59 +157,53 @@ jobs:
154157 name : Native browser fixture
155158 runs-on : ubuntu-24.04
156159 timeout-minutes : 15
160+ outputs :
161+ artifact-id : ${{ steps.fixture-upload.outputs.artifact-id }}
157162 steps :
158163 - uses : actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
159164 with :
160165 persist-credentials : false
161- # Browser fixtures need only the pinned compiler, Cargo and standard library,
162- # not Hermit's full Rust archive (including docs).
163- - name : Install minimal pinned Rust for browser fixtures
164- shell : bash
165- run : |
166- pins=(bin/.rust-*.pkg)
167- test "${#pins[@]}" -eq 1
168- test -L "${pins[0]}"
169- version=${pins[0]#bin/.rust-}
170- version=${version%.pkg}
171- rustup toolchain install "$version" --profile minimal --no-self-update
172- rustc_path=$(rustup which --toolchain "$version" rustc)
173- toolchain_bin=$(dirname "$rustc_path")
174- test -x "$toolchain_bin/rustc"
175- test -x "$toolchain_bin/cargo"
176- echo "RUSTUP_TOOLCHAIN=$version" >> "$GITHUB_ENV"
177- echo "HERMIT_PREPEND_PATH=$toolchain_bin" >> "$GITHUB_ENV"
178- # This journey uses a real native plugin-manager bridge. Provision it
179- # before Playwright starts: a cold Rust install/build is test setup, not
180- # browser behavior, and must not consume the journey's subprocess budget.
166+ - uses : ./.github/actions/setup
181167 - uses : Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
182168 with :
183169 key : browser-fixture
184170 save-if : ${{ github.event_name == 'push' }}
185171 - name : Build native browser fixture
186- run : cargo build --locked -p buzzodz-plugins --example fixture-bridge
172+ timeout-minutes : 8
173+ run : ./bin/cargo build --locked -p buzzodz-plugins --example fixture-bridge --target-dir target/browser-fixture
174+ - name : Package same-revision native fixture
175+ run : |
176+ mkdir -p target/browser-artifact
177+ cp target/browser-fixture/debug/examples/fixture-bridge target/browser-artifact/
178+ git rev-parse HEAD > target/browser-artifact/revision
179+ cd target/browser-artifact
180+ sha256sum fixture-bridge > SHA256SUMS
181+ tar -cf ../browser-fixture.tar fixture-bridge revision SHA256SUMS
187182 - uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
183+ id : fixture-upload
188184 with :
189- name : native- browser-fixture
190- path : target/debug/examples/fixture-bridge
185+ name : browser-fixture-${{ github.sha }}-${{ github.run_attempt }}
186+ path : target/browser-fixture.tar
191187 if-no-files-found : error
192188 retention-days : 1
193189
194190 browser :
191+ if : github.event_name != 'workflow_dispatch'
192+ name : Browser journeys (${{ matrix.engine }}, ${{ matrix.shard }}/6)
193+ # Measurements stay isolated on their own runner, not on our critical path.
194+ # CI required still requires their success independently of these jobs.
195195 needs : [browser_fixture]
196- # https://playwright.dev/docs/ci#via-containers
196+ runs-on : ubuntu-24.04
197+ # Match package.json's Playwright version and pin immutable browser/OS layers.
197198 container :
198199 image : mcr.microsoft.com/playwright:v1.63.0-noble@sha256:eff16c30e6f3f4af0a03fa4b706120d5e9b0891c344a27d64559aff5900a4a27
199200 options : --init --ipc=host
200201 defaults :
201202 run :
202203 shell : bash
203204 env :
204- BUZZ_BROWSER_FIXTURE : ${{ github.workspace }}/.browser-fixture/fixture-bridge
205- if : github.event_name != 'workflow_dispatch'
206- name : Browser journeys (${{ matrix.engine }}, ${{ matrix.shard }}/6)
207- # Measurements stay isolated on their own runner, not on our critical path.
208- # CI required still requires their success independently of these jobs.
209- runs-on : ubuntu-24.04
205+ HOME : /root
206+ BUZZ_BROWSER_FIXTURE_DIR : target/ci-browser-fixture
210207 # Six file-level shards split the large file groups that remain together
211208 # with four or five shards, leaving room for setup inside the same deadline.
212209 timeout-minutes : 15
@@ -219,22 +216,30 @@ jobs:
219216 - uses : actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
220217 with :
221218 persist-credentials : false
222- - uses : ./.github/actions/setup
223- # Container steps need their own Git trust for the host-owned checkout.
224- - name : Trust checked-out workspace
219+ - name : Trust this container workspace
225220 run : git config --global --add safe.directory "$GITHUB_WORKSPACE"
226- - uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
221+ - uses : ./.github/actions/setup
222+ with :
223+ browsers : " true"
224+ browser-engine : ${{ matrix.engine }}
225+ - uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
227226 with :
228- name : native-browser-fixture
229- path : .browser-fixture
230- - name : Restore fixture executable permission
231- run : chmod +x .browser-fixture/fixture-bridge
227+ artifact-ids : ${{ needs.browser_fixture.outputs.artifact-id }}
228+ merge-multiple : true
229+ path : target/ci-browser-fixture
230+ - name : Verify native browser fixture
231+ run : |
232+ cd target/ci-browser-fixture
233+ tar -xf browser-fixture.tar
234+ test "$(cat revision)" = "$(git rev-parse HEAD)"
235+ sha256sum --check SHA256SUMS
236+ test -x fixture-bridge
232237 # CI required enforces measurement success. --no-deps avoids repeating
233238 # measurements here; the matrix covers both engines on separate runners.
234239 - name : Functional journeys
235240 env :
236241 PLAYWRIGHT_JSON_OUTPUT_FILE : test-results/browser/ci-report.json
237- run : node scripts/ci-test-report.mjs kind=playwright report=test-results/browser/ci-report.json evidence=test-results/browser/ci-timing.json title="Browser journeys (${{ matrix.engine }}, ${{ matrix.shard }}/6)" -- pnpm test:browser:ci --project ${{ matrix.engine }} --no-deps --shard=${{ matrix.shard }}/6 --reporter=list,json
242+ run : ./bin/ node scripts/ci-test-report.mjs kind=playwright report=test-results/browser/ci-report.json evidence=test-results/browser/ci-timing.json title="Browser journeys (${{ matrix.engine }}, ${{ matrix.shard }}/6)" -- ./bin/ pnpm test:browser:ci --project ${{ matrix.engine }} --no-deps --shard=${{ matrix.shard }}/6 --reporter=list,json
238243 - name : Browser evidence
239244 if : always()
240245 uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
@@ -246,7 +251,7 @@ jobs:
246251 required :
247252 name : ${{ github.event_name == 'workflow_dispatch' && 'Automatic CI (not requested)' || 'CI required' }}
248253 if : always() && github.event_name != 'workflow_dispatch'
249- needs : [javascript, native, measurements, browser]
254+ needs : [javascript, native, measurements, browser_fixture, browser]
250255 runs-on : ubuntu-24.04
251256 timeout-minutes : 2
252257 steps :
@@ -255,8 +260,9 @@ jobs:
255260 JAVASCRIPT : ${{ needs.javascript.result }}
256261 NATIVE : ${{ needs.native.result }}
257262 MEASUREMENTS : ${{ needs.measurements.result }}
263+ FIXTURE : ${{ needs.browser_fixture.result }}
258264 BROWSER : ${{ needs.browser.result }}
259265 run : |
260- for result in "$JAVASCRIPT" "$NATIVE" "$MEASUREMENTS" "$BROWSER"; do
266+ for result in "$JAVASCRIPT" "$NATIVE" "$MEASUREMENTS" "$FIXTURE" "$ BROWSER"; do
261267 test "$result" = success || exit 1
262268 done
0 commit comments