chore(testing): Setup new self-hosted test runner (#6067)

This commit is contained in:
Joe Boccanfuso authored and GitHub committed 2026-06-18 11:21:41 -04:00
1 parent 6e2d53f280
commit 0dd6571505
8 files changed
+139 -49

No files matched your search

+23 -12
View File
@@ -23,7 +23,7 @@ concurrency:
jobs:
playwright-tests:
timeout-minutes: 120
runs-on: self-hosted
runs-on: [self-hosted, nashua]
strategy:
fail-fast: false
matrix:
@@ -32,14 +32,6 @@ jobs:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
# Self-hosted runner hygiene: wipe any stale/corrupted pnpm self-install
# before action-setup reinstalls it. A prior `cache: pnpm` restore left a
# pnpm install missing dist/worker.js, breaking `pnpm install`. Plain shell
# so it runs even when pnpm itself is broken. Cheap: action-setup reinstalls.
- name: Reset stale pnpm self-install
shell: bash
run: rm -rf "$HOME/setup-pnpm"
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ matrix.node-version }}
@@ -47,6 +39,19 @@ jobs:
# pnpm store on local disk. The Actions cache doesn't preserve the
# pnpm self-install's links faithfully, dropping pnpm/dist/worker.js
# and breaking `pnpm install` with MODULE_NOT_FOUND.
# Install pnpm via Corepack instead of pnpm/action-setup. The action's
# self-installer is a JS action run under the runner's bundled
# externals/node{version} and derives the `npm` path from that runtime — which
# on this self-hosted runner is corrupted (Cannot find module
# '../lib/cli.js'), so it dies regardless of `standalone:true`. Corepack
# ships inside the Node that setup-node just installed, reads the pinned
# `packageManager` (pnpm@11.5.2) from package.json, and fetches pnpm via
# Node's own https — it never invokes the npm CLI.
- name: Enable Corepack (pnpm)
shell: bash
run: |
corepack enable
corepack prepare --activate
# ── CS3D integration: detect label and ref type ──────────────────────
- name: Check for CS3D integration label
@@ -119,7 +124,12 @@ jobs:
# ── Common: run tests ───────────────────────────────────────────────
- name: Install Playwright browsers
run: npx playwright install
# Only chromium is used (see playwright.config.ts and tests/globalSetup.ts);
# firefox/webkit projects are commented out. Scoping the install to chromium
# avoids downloading + dep-validating browsers we never launch (the WebKit
# validation is what surfaces the "missing libwoff1/libflite1/..." error on
# hosts without those libs).
run: npx playwright install chromium
- name: Run Playwright tests
run: |
export NODE_OPTIONS="--max_old_space_size=10192"
@@ -161,7 +171,8 @@ jobs:
fi
node .scripts/log-build-context.mjs
env:
BUILD_TYPE: ${{ steps.cs3d-ref.outputs.type == 'branch' && 'ohif-downstream' || 'ohif-upstream' }}
BUILD_TYPE:
${{ steps.cs3d-ref.outputs.type == 'branch' && 'ohif-downstream' || 'ohif-upstream' }}
CS3D_REF_TYPE: ${{ steps.cs3d-ref.outputs.type }}
- name: Build OHIF viewer (CS3D preview)
@@ -203,7 +214,7 @@ jobs:
# ── Separate job: block merge when using a CS3D branch ─────────────
cs3d-branch-merge-guard:
name: "CS3D Branch Merge Guard"
name: 'CS3D Branch Merge Guard'
runs-on: ubuntu-latest
timeout-minutes: 5
steps: