Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
136 changes: 124 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
name: CI

# Runs on every PR and on master: typecheck, unit + catalog-smoke tests, an
# authoring build, and Playwright e2e (deterministic UI flow — the live-render
# checks that need the external Sandpack bundler are gated behind E2E_LIVE).
# Also callable (workflow_call) so the deploy workflow can gate on it.
# The reusable CI suite, as a DAG (same shape as the handsontable monorepo's
# test workflow): build fans out to the consumers, artifacts are passed instead
# of rebuilt, and the Playwright job runs inside the pinned Playwright
# container so the browser always matches the test package.
#
# unit ──► build ──► authoring ──► e2e
#
# unit gates build: it is the cheapest job (pnpm test builds the runtime
# itself, by design), so a broken helper fails the run before any minutes go
# into the app build or a browser container.
#
# The live-render checks that need the external Sandpack bundler stay gated
# behind E2E_LIVE (e2e-live.yml). Also callable (workflow_call) so the deploy
# workflows can gate on the whole DAG.

# No push trigger of its own: master pushes run this exactly once through
# master.yml's `test` job (workflow_call). Before that split, one push touching
# runner/packages/** ran this suite three times.
on:
pull_request: {}
push:
branches: [master]
workflow_call: {}
workflow_dispatch: {}

Expand All @@ -20,7 +31,31 @@ concurrency:
cancel-in-progress: true

jobs:
test:
unit:
runs-on: ubuntu-latest
defaults:
run:
working-directory: runner
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
package_json_file: runner/package.json

- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
cache-dependency-path: runner/pnpm-lock.yaml

- run: pnpm install --frozen-lockfile

- name: Unit + catalog-smoke tests
run: pnpm test

build:
needs: unit
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -44,17 +79,90 @@ jobs:

- run: pnpm build

# Typecheck rides with build: apps/authoring typechecks against
# packages/runtime/dist, which this job just produced.
- name: Typecheck
run: pnpm typecheck

- name: Unit + catalog-smoke tests
run: pnpm test
- name: Upload the runtime build
uses: actions/upload-artifact@v4
with:
name: runtime-dist
path: runner/packages/runtime/dist/
retention-days: 1
if-no-files-found: error

authoring:
needs: build
runs-on: ubuntu-latest
defaults:
run:
working-directory: runner
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
package_json_file: runner/package.json

- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
cache-dependency-path: runner/pnpm-lock.yaml

- run: pnpm install --frozen-lockfile

- name: Download the runtime build
uses: actions/download-artifact@v4
with:
name: runtime-dist
path: runner/packages/runtime/dist/

- name: Build authoring (build smoke + e2e target)
run: pnpm --filter @handsontable/demo-authoring build

- name: Install Playwright browser
run: pnpm exec playwright install --with-deps chromium
- name: Upload the authoring build
uses: actions/upload-artifact@v4
with:
name: authoring-dist
path: runner/apps/authoring/dist/
retention-days: 1
if-no-files-found: error

e2e:
needs: authoring
runs-on: ubuntu-latest
# The official Playwright image ships the browsers, so there is no
# `playwright install` step. Keep this tag in lockstep with
# `@playwright/test` in runner/package.json — bump the two together, never
# apart (the same rule the handsontable monorepo enforces via its pnpm
# catalog comment).
container:
image: mcr.microsoft.com/playwright:v1.61.1-noble
defaults:
run:
working-directory: runner
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
package_json_file: runner/package.json

- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
cache-dependency-path: runner/pnpm-lock.yaml

- run: pnpm install --frozen-lockfile

- name: Download the authoring build (the e2e target)
uses: actions/download-artifact@v4
with:
name: authoring-dist
path: runner/apps/authoring/dist/

- name: E2E (Playwright)
run: pnpm e2e
Expand All @@ -64,5 +172,9 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: runner/playwright-report/
# playwright-report/ holds the html report, test-results/ the traces.
path: |
runner/playwright-report/
runner/test-results/
retention-days: 7
if-no-files-found: warn
82 changes: 0 additions & 82 deletions .github/workflows/deploy-runner-api.yml

This file was deleted.

95 changes: 0 additions & 95 deletions .github/workflows/deploy-runner-authoring.yml

This file was deleted.

13 changes: 9 additions & 4 deletions .github/workflows/e2e-live.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ concurrency:
jobs:
live:
runs-on: ubuntu-latest
# Same image rule as ci.yml: keep the tag in lockstep with @playwright/test
# in runner/package.json — bump the two together, never apart.
container:
image: mcr.microsoft.com/playwright:v1.61.1-noble
# Local live run takes seconds once built; leave headroom for a cold
# hosted-bundler transpile of the heavier examples. The deployed run also
# boots four real containers for the Style panel suite, one at a time.
Expand Down Expand Up @@ -90,9 +94,6 @@ jobs:
pnpm build
pnpm --filter @handsontable/demo-authoring build

- name: Install Playwright browser
run: pnpm exec playwright install --with-deps chromium

- name: E2E with live-render checks
env:
E2E_LIVE: '1'
Expand Down Expand Up @@ -123,5 +124,9 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: playwright-report-live
path: runner/playwright-report/
# playwright-report/ holds the html report, test-results/ the traces.
path: |
runner/playwright-report/
runner/test-results/
retention-days: 7
if-no-files-found: warn
Loading
Loading