-
-
Notifications
You must be signed in to change notification settings - Fork 27
76 lines (60 loc) · 1.89 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:
- main
pull_request:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node_version: [22]
fail-fast: false
name: 'Build&Test: node-${{ matrix.node_version }}, ${{ matrix.os }}'
steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Install pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v3.0.0
- name: Set node version to ${{ matrix.node_version }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: ${{ matrix.node_version }}
cache: 'pnpm'
- name: Versions
run: |
echo "pnpm: $(pnpm --version)"
echo "npm : $(npm --version)"
echo "node: $(node --version)"
echo "process.versions:"
node -p process.versions
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm run build
- name: Check scripts
run: pnpm run ts-check
- name: Test
run: pnpm run test
lint:
runs-on: ubuntu-latest
name: 'Lint: node-22, ubuntu-latest'
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Install pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v3.0.0
- name: Set node version to 22
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 22
cache: 'pnpm'
- name: Prepare
run: |
pnpm install --frozen-lockfile
pnpm run build
- name: Lint
run: pnpm run lint
- name: Check formatting
run: pnpm prettier --check .