-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (59 loc) · 1.9 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
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
name: CI
on:
push:
branches: '*'
pull_request:
branches: '*'
jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- name: 🛎️ Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0 # All history for branches and tags
- name: 📦 Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: 🛠️ Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: '${{ matrix.node-version }}'
cache: pnpm
- name: 📂 Install Dependencies
run: pnpm i
- name: 🧐 Check Code Quality
run: pnpm lint
# - name: 🎭 Install Playwright
# run: pnpm i playwright http-server wait-on; npx playwright install --with-deps
- name: 📔 Build Storybook
run: pnpm build-storybook --quiet
# - name: 🧪 Serve Storybook and run tests
# run: |
# pnpx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
# "pnpm exec http-server storybook-static --port 6006 --silent" \
# "pnpm exec wait-on tcp:6006 && pnpm test-storybook"
# - name: 🔬 Run Unit Tests
# run: pnpm jest ...
# - name: 🔍 Run Integration Tests
# run: pnpm jest ...
# - name: ⌚ 💀 Run E2E Tests
# run: pnpx playwright test
- name: 👀 Run Visual Tests
env:
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
run: pnpm chromatic
- name: 🏗️ Build Project
# env:
# SANITY_API_READ_TOKEN: ${{ secrets.SANITY_API_READ_TOKEN }}
run: pnpm build
- name: 🤖 Run Semantic Release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: pnpm exec semantic-release
- name: 💰 Profit
run: echo 🐞