Repository navigation
93 lines (85 loc) · 2.71 KB
/
Copy pathci.yml
File metadata and controls
93 lines (85 loc) · 2.71 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
85
86
87
88
89
90
91
92
93
name: CI
on:
push:
branches: [develop]
pull_request:
branches: [develop]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
env:
PUBLIC_SITE_URL: ${{ vars.SITE_URL }}
# Every job pays about 25 seconds of setup (checkout, pnpm, Node, install),
# while the compile step is about 12 seconds. So the compiled data is
# produced inline wherever it is needed rather than passed around as an
# artifact, and the prerendered site (hundreds of MB) never leaves the job
# that built it.
jobs:
format:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
with:
standalone: true
- uses: actions/setup-node@v7
with:
node-version: 22
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm format:check
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
with:
standalone: true
- uses: actions/setup-node@v7
with:
node-version: 22
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm test
type-check:
name: Type Check
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
with:
standalone: true
- uses: actions/setup-node@v7
with:
node-version: 22
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm compile:api
- run: pnpm compile:pcd
- run: pnpm check
# Build and Lint share a job because the custom lint rules read the
# prerendered HTML in build/. Uploading that output as an artifact and
# downloading it into a second job cost more than lint itself.
build:
name: Build + Lint
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
with:
standalone: true
- uses: actions/setup-node@v7
with:
node-version: 22
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm compile:api
- run: pnpm compile:pcd
- run: pnpm build
- run: pnpm lint