Skip to content

Feature/e2e gap coverage #470

Feature/e2e gap coverage

Feature/e2e gap coverage #470

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
name: Lint & Format Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- run: npm ci
- run: npm run lint
- run: npm run format:check
test:
name: Unit & Integration Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- run: npm ci
- run: npm run test:unit
- run: npm run test:integration
- name: Upload coverage
uses: codecov/codecov-action@v4
if: always()
with:
files: ./coverage/lcov.info
build:
name: Build & Bundle Size Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- run: npm ci
- run: npm run build
- name: Check bundle size
run: npm run size-check
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
# e2e:
# name: E2E Tests
# runs-on: ubuntu-latest
# needs: build
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v4
# with:
# node-version: '22'
# cache: 'npm'
# - run: npm ci
# - name: Download build artifacts
# uses: actions/download-artifact@v4
# with:
# name: dist
# path: dist/
# - name: Install Playwright browsers
# run: npx playwright install chromium --with-deps
# - run: npm run test:e2e
# - name: Upload test results
# uses: actions/upload-artifact@v4
# if: always()
# with:
# name: playwright-report
# path: playwright-report/
# E2E tests temporarily disabled - will be re-enabled in future PR
chromatic:
name: Visual Regression Tests
runs-on: ubuntu-latest
# Only run on push events to main branch
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- run: npm ci
- name: Run Chromatic
uses: chromaui/action@latest
# Don't fail if CHROMATIC_PROJECT_TOKEN is not configured
continue-on-error: true
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
exitZeroOnChanges: true
# Don't fail the build on Chromatic errors during Phase 0
onlyChanged: true