-
Notifications
You must be signed in to change notification settings - Fork 15
57 lines (56 loc) · 1.81 KB
/
ci.yaml
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
name: 'CI'
on:
push:
branches:
- main
pull_request:
jobs:
lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20.x'
- name: Install dependencies
run: npm install
- name: Lint
run: npm run lint:check
- name: Type check
run: npm run typecheck
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20.x'
- name: Install d2 document generator
run: curl -fsSL https://d2lang.com/install.sh | sh -s --
- name: Install dependencies
run: npm install
- name: Unit test
run: npm run test:unit
- name: Build production site
run: npm run build
- name: Install Playwright browsers
run: npx playwright install --with-deps
- name: End-to-end test
run: npx playwright test -c e2e/playci.config.ts
### Uncomment when you need to re-extract snapshots
# - name: Extract snapshots
# if: always()
# uses: actions/upload-artifact@v4
# with:
# name: ci_actual_snapshots
# path: e2e/results/manual/output