-
Notifications
You must be signed in to change notification settings - Fork 917
73 lines (59 loc) · 2.06 KB
/
Copy pathci.yml
File metadata and controls
73 lines (59 loc) · 2.06 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
name: CI
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
env:
NODE_VERSION: "24.19.0"
jobs:
# Parallel to `test` so lint and test failures surface on the same run; type checking lives in Build.
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
# Ahead of setup-node, which shells out to `pnpm store path` to find the directory it caches.
- name: Enable Corepack
run: corepack enable
- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm lint:check
test:
name: Build and test
runs-on: ubuntu-latest
# Install, build and test together take ~2.5 minutes. Without an explicit cap a wedged test
# process (a spawned child that outlives its reap keeps `node --test` alive forever) burns the
# 6-hour default instead of failing, on every run of the branch.
timeout-minutes: 20
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
# Ahead of setup-node, which shells out to `pnpm store path` to find the directory it caches.
- name: Enable Corepack
run: corepack enable
- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
# Codegen, the frontend/SPA bundles, and the repo's single type check (`types:check` aliases this).
- name: Build
run: pnpm build
- name: Test
run: pnpm test