9ecba9a6f1
CI Pipeline / canary (push) Successful in 0s
CI Pipeline / test (20) (push) Failing after 1m10s
CI Pipeline / test (18) (push) Failing after 1m21s
CI Pipeline / e2e (chromium) (push) Failing after 1m18s
CI Pipeline / e2e (firefox) (push) Failing after 1m8s
CI Pipeline / e2e (webkit) (push) Failing after 1m13s
CI Pipeline / visual-regression (push) Failing after 1m43s
CI Pipeline / performance (push) Failing after 1m24s
CI Pipeline / lint (push) Failing after 57s
CI Pipeline / build (push) Failing after 56s
CI Pipeline / canary (pull_request) Successful in 1s
CI Pipeline / test (18) (pull_request) Failing after 1m10s
CI Pipeline / test (20) (pull_request) Failing after 47s
CI Pipeline / storybook (push) Failing after 5m41s
CI Pipeline / e2e (chromium) (pull_request) Failing after 59s
CI Pipeline / e2e (firefox) (pull_request) Failing after 1m3s
CI Pipeline / e2e (webkit) (pull_request) Failing after 1m4s
CI Pipeline / performance (pull_request) Failing after 1m25s
CI Pipeline / visual-regression (pull_request) Failing after 1m35s
CI Pipeline / lint (pull_request) Failing after 53s
CI Pipeline / build (pull_request) Failing after 1m7s
CI Pipeline / storybook (pull_request) Failing after 5m33s
187 lines
5.6 KiB
YAML
187 lines
5.6 KiB
YAML
name: CI Pipeline
|
|
run-name: ${{ gitea.actor }} triggered CI pipeline
|
|
|
|
on:
|
|
workflow_dispatch: {}
|
|
push:
|
|
branches: [main, develop, "fix-runner-trigger"]
|
|
pull_request:
|
|
branches: [main, develop]
|
|
|
|
jobs:
|
|
canary:
|
|
runs-on: [self-hosted, macos-latest]
|
|
steps:
|
|
- run: |
|
|
uname -a
|
|
node -v || true
|
|
echo "Runner labels OK ✅"
|
|
|
|
test:
|
|
runs-on: [self-hosted, macos-latest]
|
|
strategy:
|
|
matrix: { node-version: [18, 20] }
|
|
env:
|
|
NODE_OPTIONS: "--max_old_space_size=4096"
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
cache: npm
|
|
- run: npm ci
|
|
- run: npm test
|
|
|
|
# If the Codecov Action fails on Gitea, replace this with the bash uploader below
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v3
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
files: ./coverage/lcov.info
|
|
flags: unittests
|
|
|
|
# Bash uploader alternative (uncomment if the action above has issues)
|
|
# - name: Upload coverage to Codecov (bash)
|
|
# run: |
|
|
# curl -s https://codecov.io/bash > codecov.sh
|
|
# bash codecov.sh -t "${{ secrets.CODECOV_TOKEN }}" -f coverage/lcov.info -F unittests
|
|
|
|
e2e:
|
|
runs-on: [self-hosted, macos-latest]
|
|
strategy:
|
|
matrix: { browser: [chromium, firefox, webkit] }
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with: { node-version: 20, cache: npm }
|
|
- run: npm ci
|
|
- run: npx playwright install --with-deps ${{ matrix.browser }}
|
|
- run: npm run build
|
|
|
|
# start app, wait, run tests
|
|
- run: npm run preview &
|
|
env: { CI: true }
|
|
- run: npx wait-on http://localhost:3000
|
|
- run: npx playwright test --project=${{ matrix.browser }}
|
|
env: { CI: true }
|
|
|
|
# package artifacts (keeps file count small)
|
|
- name: Package E2E artifacts
|
|
if: always()
|
|
run: |
|
|
tar -czf playwright-${{ matrix.browser }}.tgz playwright-report test-results || true
|
|
|
|
- name: Upload E2E artifacts
|
|
if: always()
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: playwright-results-${{ matrix.browser }}
|
|
path: playwright-${{ matrix.browser }}.tgz
|
|
retention-days: 30
|
|
|
|
visual-regression:
|
|
runs-on: [self-hosted, macos-latest]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with: { node-version: 20, cache: npm }
|
|
- run: npm ci
|
|
- run: npx playwright install --with-deps
|
|
- run: npm run build
|
|
- run: npm run preview &
|
|
env: { CI: true }
|
|
- run: npx wait-on http://localhost:3000
|
|
|
|
# Seed snapshots on main branch only (one-time setup)
|
|
- name: Seed snapshots (main only)
|
|
if: github.ref == 'refs/heads/main'
|
|
run: PLAYWRIGHT_UPDATE_SNAPSHOTS=1 npx playwright test tests/e2e/visual-regression.spec.ts --project=chromium
|
|
env: { CI: true }
|
|
|
|
# Run visual regression tests
|
|
- name: Run visual regression tests
|
|
run: npx playwright test tests/e2e/visual-regression.spec.ts
|
|
env: { CI: true }
|
|
|
|
- name: Package visual artifacts
|
|
if: always()
|
|
run: |
|
|
tar -czf visual-regression.tgz test-results tests/e2e/visual-regression.spec.ts-snapshots || true
|
|
|
|
- name: Upload visual artifacts
|
|
if: always()
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: visual-regression-results
|
|
path: visual-regression.tgz
|
|
retention-days: 30
|
|
|
|
performance:
|
|
runs-on: [self-hosted, macos-latest]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with: { node-version: 20, cache: npm }
|
|
- run: npm ci
|
|
|
|
- name: Install LHCI
|
|
run: npm i -D @lhci/cli
|
|
|
|
# Ensure a Chrome binary is available (works on Linux/macOS runners)
|
|
- name: Install Chrome via Puppeteer (portable)
|
|
run: |
|
|
npx @puppeteer/browsers install chrome@stable -P .cache/puppeteer
|
|
echo "CHROME_PATH=$(npx @puppeteer/browsers executable-path chrome@stable -P .cache/puppeteer)" >> $GITHUB_ENV
|
|
|
|
- name: Build application
|
|
run: npm run build
|
|
|
|
- name: Start application
|
|
run: npm run preview &
|
|
env: { CI: true }
|
|
|
|
- name: Wait for application
|
|
run: npx wait-on http://localhost:3000
|
|
|
|
- name: Run Lighthouse CI
|
|
run: npx lhci autorun --chrome-path="$CHROME_PATH"
|
|
env: { CI: true }
|
|
|
|
- name: Upload LHCI results
|
|
if: always()
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: lhci-results
|
|
path: lhci-results
|
|
|
|
storybook:
|
|
runs-on: [self-hosted, macos-latest]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with: { node-version: 20, cache: npm }
|
|
- run: npm ci
|
|
- run: npm run storybook:build:github
|
|
- run: npm run test:sb
|
|
env: { CI: true }
|
|
|
|
lint:
|
|
runs-on: [self-hosted, macos-latest]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with: { node-version: 20, cache: npm }
|
|
- run: npm ci
|
|
- run: npm run lint
|
|
- run: npx prettier --check "**/*.{js,jsx,ts,tsx,json,css,md}"
|
|
|
|
build:
|
|
runs-on: [self-hosted, macos-latest]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with: { node-version: 20, cache: npm }
|
|
- run: npm ci
|
|
- run: npm run build
|
|
- run: npm run storybook:build:github
|