-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (64 loc) · 1.7 KB
/
Copy pathci.yml
File metadata and controls
83 lines (64 loc) · 1.7 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
NEXT_PUBLIC_SUPABASE_URL: http://127.0.0.1:54321
NEXT_PUBLIC_SUPABASE_ANON_KEY: ci-anon-key
SUPABASE_SERVICE_ROLE_KEY: ci-service-role
MISTRAL_API_KEY: ci-mistral-fake
NEXT_PUBLIC_APP_URL: http://localhost:3000
jobs:
quality:
name: Lint + Typecheck + Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- name: Prettier check
run: npm run format:check
- name: ESLint
run: npm run lint
- name: TypeScript
run: npm run typecheck
- name: Vitest
run: npm test
- name: Build
run: npm run build
e2e:
name: Playwright smoke
runs-on: ubuntu-latest
needs: quality
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- name: Cache Playwright browsers
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: pw-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Install browsers
run: npx playwright install --with-deps chromium
- name: Build
run: npm run build
- name: Run Playwright
run: npm run test:e2e -- --project=chromium
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 7