-
Notifications
You must be signed in to change notification settings - Fork 0
109 lines (103 loc) · 2.8 KB
/
ci.yml
File metadata and controls
109 lines (103 loc) · 2.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
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