-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (59 loc) · 1.56 KB
/
Copy pathci.yml
File metadata and controls
62 lines (59 loc) · 1.56 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
name: CI
on:
push:
branches: ['**']
pull_request:
branches: [main]
jobs:
build-and-test:
name: Build & Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: '22'
cache: 'npm'
- run: npm ci
- run: npm run typecheck
- run: npm run build
- run: npm test
- uses: actions/upload-artifact@v7
if: always()
with:
name: dist
path: dist/
retention-days: 1
e2e:
name: Playwright E2E
runs-on: ubuntu-latest
needs: build-and-test
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: '22'
cache: 'npm'
- run: npm ci
- name: Cache Playwright browsers
uses: actions/cache@v5
id: pw-cache
with:
path: ~/.cache/ms-playwright
key: pw-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Install Playwright browsers
if: steps.pw-cache.outputs.cache-hit != 'true'
run: npx playwright install --with-deps chromium
- name: Install system deps (cache hit path)
if: steps.pw-cache.outputs.cache-hit == 'true'
run: npx playwright install-deps chromium
- run: npm run build
- run: npm run test:e2e
env:
CI: 'true'
- uses: actions/upload-artifact@v7
if: failure()
with:
name: playwright-report
path: playwright-report/
retention-days: 7