-
Notifications
You must be signed in to change notification settings - Fork 4
48 lines (41 loc) · 1.24 KB
/
ci.yml
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
name: 'ci'
on: push
jobs:
chromatic:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Prepare environment
run: |
pnpm run prisma:setup
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
SESSION_KEY: ${{ secrets.SESSION_KEY }}
OAUTH_CLIENT_KEY: ${{ secrets.OAUTH_CLIENT_KEY }}
OAUTH_CLIENT_SECRET: ${{ secrets.OAUTH_CLIENT_SECRET }}
- name: Install Playwright Dependencies
run: pnpm exec playwright install chromium --with-deps
- name: Run vitest
run: pnpm exec vitest run --coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Run Chromatic
uses: chromaui/action@latest
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}