Skip to content

chore(qa): harnesses clean up their temp folders #268

chore(qa): harnesses clean up their temp folders

chore(qa): harnesses clean up their temp folders #268

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
workflow_call:
permissions:
contents: read
jobs:
test:
name: build & test (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
env:
# The unit tests + tsc don't need the Electron/Playwright binaries — skip the heavy downloads.
ELECTRON_SKIP_BINARY_DOWNLOAD: '1'
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: '.nvmrc'
cache: npm
- run: npm ci
- run: npm run build
- run: npm test
- run: npm run check:docs
# Verify the macOS launcher's generated AppleScript compiles on a real Mac (no GUI needed).
- name: Validate generated AppleScript compiles
if: runner.os == 'macOS'
run: node scripts/check-applescript.mjs
qa:
# The Playwright/axe audit (a11y per view + the IPC surface round-trips) was previously
# manual-only — its gates never ran on a PR. One Linux leg under xvfb keeps it cheap.
name: qa audit (a11y + ipc, linux)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: '.nvmrc'
cache: npm
- run: npm ci
- run: npm run build
# ubuntu-24.04 runners restrict unprivileged user namespaces (AppArmor), which kills the
# Electron/Chromium sandbox before a window ever appears — firstWindow() then times out.
- name: Allow unprivileged user namespaces for the Electron sandbox
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
- name: Install a window manager for real maximize and restore journeys
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends openbox
# The audit verifies cockpit.gitInfo resolves the repo's branch. actions/checkout leaves the repo
# in detached HEAD (no current branch), so that check would fail for an environment reason unrelated
# to the app — put the checkout on a real branch first. (Local `npm run qa:audit` is already on one.)
- name: Put the checkout on a branch for the gitInfo check
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git checkout -B ci-audit
- name: Run the audit under a virtual display
run: xvfb-run -a node qa/audit.mjs
env:
DEBUG: 'pw:browser' # if launch fails again, the electron process's own stderr lands in the log
- name: Run the multilingual user journeys
run: xvfb-run -a sh -c 'openbox --sm-disable >/tmp/devdeck-openbox.log 2>&1 & node qa/screenshot.mjs'
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
if: always()
with:
name: qa-audit-and-journeys
path: qa/shots/
resilience:
name: failure and recovery journeys (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 20
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: '.nvmrc'
cache: npm
- run: npm ci
- name: Check dependency advisories
if: runner.os == 'Linux'
run: |
npm audit --audit-level=high
npm audit --omit=dev --audit-level=moderate
- run: npm run build
- name: Allow Electron sandbox
if: runner.os == 'Linux'
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
- name: Run Linux failure and recovery journeys
if: runner.os == 'Linux'
run: xvfb-run -a node qa/resilience.mjs
- name: Run Windows failure and recovery journeys
if: runner.os == 'Windows'
run: node qa/resilience.mjs
- name: Run Linux maintenance regressions
if: runner.os == 'Linux'
run: xvfb-run -a node qa/maintenance.mjs
- name: Run Windows maintenance regressions
if: runner.os == 'Windows'
run: node qa/maintenance.mjs
- name: Verify host and two viewers agree on committed session titles
if: runner.os == 'Windows'
run: node qa/session-sync.mjs
- name: Performance gate (fixture agent; animations, DOM churn, main-process stalls)
if: runner.os == 'Windows'
run: node qa/perf-gate.mjs
# One step per harness: a multi-line pwsh `run` fails only on its LAST command's exit code.
- name: Session images and attach
if: runner.os == 'Windows'
run: node qa/images.mjs
- name: Session images from a paired host
if: runner.os == 'Windows'
run: node qa/images-remote.mjs
- name: Update all Claude sessions
if: runner.os == 'Windows'
run: node qa/claude-update.mjs
- name: Restored agents start one at a time
if: runner.os == 'Windows'
run: node qa/restore-pacing.mjs
- name: Images tied to their terminal rows
if: runner.os == 'Windows'
run: node qa/image-rows.mjs
- name: Quick replies, timeline, image markup and sent documents
if: runner.os == 'Windows'
run: node qa/cockpit-tools.mjs
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
if: always()
with:
name: qa-resilience-${{ matrix.os }}
path: |
qa/shots/resilience/
qa/shots/maintenance/
qa/shots/session-sync/
qa/shots/perf-gate/
qa/shots/images/
qa/shots/images-remote/
qa/shots/image-rows/
qa/shots/cockpit-tools/
qa/shots/claude-update/