Skip to content

CI

CI #1

Workflow file for this run

name: CI
on:
workflow_dispatch:
pull_request:
push:
branches-ignore:
- main
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-24.04
timeout-minutes: 40
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup Node
uses: actions/setup-node@v7
with:
node-version: 22
cache: 'npm'
cache-dependency-path: |
package-lock.json
e2e/fixtures/*/package-lock.json
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Type-check (lib, tests, demo, e2e)
run: npm run typecheck
- name: Unit tests
run: npm test -- --maxWorkers=4
- name: Resolve Playwright version
id: playwright
run: echo "version=$(node -p "require('playwright/package.json').version")" >> "$GITHUB_OUTPUT"
- name: Cache Playwright browsers
id: playwright-cache
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ steps.playwright.outputs.version }}
- name: Install Playwright browsers
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: npx playwright install --with-deps chromium firefox webkit
- name: Install Playwright system dependencies
if: steps.playwright-cache.outputs.cache-hit == 'true'
run: npx playwright install-deps chromium firefox webkit
- name: Browser tests
run: npm run test:browser
- name: Build library (fails if React is bundled)
run: npm run build:lib
- name: Package smoke suite (packed tarball in React 18 and 19 apps)
run: npm run test:smoke -- --skip-lib
- name: Upload Playwright report
if: failure()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: |
playwright-report/
test-results/
retention-days: 14
if-no-files-found: ignore