Skip to content

Merge chunk 13: visual language (D70) #44

Merge chunk 13: visual language (D70)

Merge chunk 13: visual language (D70) #44

Workflow file for this run

name: CI
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
# ffmpeg with libx264 encodes the synthetic clips the video tests use (D35);
# the tests skip themselves with a message when it is missing.
- run: sudo apt-get update && sudo apt-get install -y --no-install-recommends ffmpeg
- run: npm ci
- run: npm run lint
- run: npm run typecheck
- run: npm test
- run: npm run build
# Separate job with no `needs:`, so a browser failure never turns `build` red
# (D36). It is not marked continue-on-error: an always-green job would hide
# the result this is here to record.
browser-smoke:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
# track.spec.ts encodes its maze clip with ffmpeg and libx264 (D35);
# Ubuntu's ffmpeg package pulls in libx264.
- run: sudo apt-get update && sudo apt-get install -y --no-install-recommends ffmpeg
- run: npm ci
# app-smoke.spec.ts serves the built dist/ as well as the dev server.
- run: npm run build
# `channel: 'chrome'` drives the installed Google Chrome, never a
# downloaded browser, so a runner without it skips rather than fails.
- name: Find Google Chrome
id: chrome
run: |
if command -v google-chrome >/dev/null 2>&1 || command -v google-chrome-stable >/dev/null 2>&1; then
echo "present=true" >> "$GITHUB_OUTPUT"
else
echo "present=false" >> "$GITHUB_OUTPUT"
echo "::notice::Google Chrome is not installed on this runner; the browser smoke tests were skipped."
fi
# The shipped-UI flow on the example cohort, and a generated clip through
# decode → track → analyse → export. A red spec fails this job and the run.
- if: steps.chrome.outputs.present == 'true'
run: npm run test:browser:ci
- if: always()
uses: actions/upload-artifact@v4
with:
name: browser-smoke-results
path: test-results/
if-no-files-found: ignore
retention-days: 7