Files
twenty/.github/workflows/ci-new-ui.yaml
T
Charles Bochet 33a403c0bd feat: add Argos visual regression for twenty-new-ui
Set up CI + visual regression infrastructure for twenty-new-ui:

- Add ci-new-ui.yaml workflow (mirrors ci-ui.yaml for twenty-new-ui)
- Update visual-regression-dispatch.yaml to watch both CI UI and CI New UI,
  dispatching to ci-privileged for three Argos projects:
  1. Self-hosted twenty-ui pixel diff (existing, unchanged)
  2. Self-hosted twenty-new-ui pixel diff (new)
  3. Self-hosted twenty-ui vs twenty-new-ui comparison (new)
- Add visual regression documentation to twenty-new-ui README
- Resolve open question 4 (visual regression tooling: Argos confirmed)
2026-06-05 17:49:44 +02:00

107 lines
3.4 KiB
YAML

name: CI New UI
on:
pull_request:
merge_group:
push:
branches: [main]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
changed-files-check:
if: github.event_name == 'pull_request'
uses: ./.github/workflows/changed-files.yaml
with:
files: |
package.json
yarn.lock
packages/twenty-new-ui/**
packages/twenty-shared/**
new-ui-task:
needs: changed-files-check
if: needs.changed-files-check.outputs.any_changed == 'true'
timeout-minutes: 30
runs-on: ubuntu-latest
strategy:
matrix:
task: [lint, typecheck, test]
steps:
- name: Fetch custom Github Actions and base branch history
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
fetch-depth: 10
- name: Install dependencies
uses: ./.github/actions/yarn-install
- name: Run ${{ matrix.task }}
run: npx nx ${{ matrix.task }} twenty-new-ui
new-ui-sb-build:
needs: changed-files-check
if: >-
always() &&
(github.event_name == 'push' ||
needs.changed-files-check.outputs.any_changed == 'true')
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Fetch custom Github Actions and base branch history
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
fetch-depth: 10
- name: Install dependencies
uses: ./.github/actions/yarn-install
- name: Build storybook
run: npx nx storybook:build twenty-new-ui
- name: Upload storybook build
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: storybook-twenty-new-ui
path: packages/twenty-new-ui/storybook-static
retention-days: 1
new-ui-sb-test:
timeout-minutes: 30
runs-on: ubuntu-latest
needs: new-ui-sb-build
if: always() && needs.new-ui-sb-build.result == 'success'
steps:
- name: Fetch custom Github Actions and base branch history
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
fetch-depth: 10
- name: Install dependencies
uses: ./.github/actions/yarn-install
- name: Build dependencies
run: npx nx build twenty-shared
- name: Download storybook build
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: storybook-twenty-new-ui
path: packages/twenty-new-ui/storybook-static
- name: Install Playwright
run: |
cd packages/twenty-new-ui
npx playwright install
- name: Run storybook tests
run: npx nx storybook:test twenty-new-ui
- name: Upload screenshots for visual regression
if: always() && !cancelled()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: argos-screenshots-twenty-new-ui
path: packages/twenty-new-ui/screenshots
retention-days: 1
ci-new-ui-status-check:
if: always() && !cancelled()
timeout-minutes: 5
runs-on: ubuntu-latest
needs: [changed-files-check, new-ui-task, new-ui-sb-build, new-ui-sb-test]
steps:
- name: Fail job if any needs failed
if: contains(needs.*.result, 'failure')
run: exit 1