Repository navigation
84 lines (78 loc) · 2.26 KB
/
Copy pathci.yml
File metadata and controls
84 lines (78 loc) · 2.26 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
84
name: CI
on:
pull_request:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7.0.1
- name: Use Node.js
uses: actions/setup-node@v7.1.0
with:
node-version-file: .nvmrc
cache: 'npm'
- name: Install Dependencies
run: npm ci
- name: Run Build
run: npm run build
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7.0.1
- name: Use Node.js
uses: actions/setup-node@v7.1.0
with:
node-version-file: .nvmrc
cache: 'npm'
- name: Install Dependencies
run: npm ci
- name: Run Preprocess
run: npm run preprocess
- name: Run Lint
run: npm run lint:check
- name: Run Type Checker
run: npm run type
build-storybook:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7.0.1
- name: Use Node.js
uses: actions/setup-node@v7.1.0
with:
node-version-file: .nvmrc
cache: 'npm'
- name: Install Dependencies
run: npm ci
- name: Run Build
run: npm run build-storybook
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7.0.1
- name: Use Node.js
uses: actions/setup-node@v7.1.0
with:
node-version-file: .nvmrc
cache: 'npm'
- name: Install Dependencies
run: npm ci
# Chromium is not in the npm install: Playwright downloads browsers
# separately. We deliberately do NOT cache them, per Playwright's own CI
# guidance (https://playwright.dev/docs/ci) — restoring the cache costs
# about as much as downloading, and the system libraries Chromium needs
# are not cacheable, so `--with-deps` still spends 12-18s on a cache hit.
- name: Install Playwright Chromium
run: npx playwright install --with-deps chromium
- name: Run Preprocess
run: npm run preprocess
- name: Run Build (necessary for including css file in tests)
run: npm run build
- name: Run Tests
run: npm run test