Repository navigation
159 lines (151 loc) · 4.12 KB
/
Copy pathnodejs.yml
File metadata and controls
159 lines (151 loc) · 4.12 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
name: Node CI
on:
push:
branches:
- main
- stable
- 'releases/**'
pull_request:
workflow_dispatch:
concurrency:
group: node-ci-${{ github.ref }}
cancel-in-progress: true
# Jobs run on ubuntu-24.04 instead of ubuntu-latest: Playwright 1.58 does not
# support Ubuntu 26.04, which ubuntu-latest becomes from 2026-10-19.
jobs:
static:
name: static (22.x)
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v5
with:
version: 10.28.1
- name: Use Node.js 22.x
uses: actions/setup-node@v5
with:
node-version: '22.x'
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'
- name: Lint
run: pnpm lint
- name: Typecheck
run: pnpm typecheck
- name: Typecheck tests
run: pnpm typecheck:test
tests:
name: test (${{ matrix.node-version }} / ${{ matrix.suite }})
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
node-version: [20.x, 22.x]
suite: [unit, integration]
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v5
with:
version: 10.28.1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run ${{ matrix.suite }} tests
run: pnpm test:${{ matrix.suite }}
env:
CI: true
e2e:
name: e2e (22.x)
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v5
with:
version: 10.28.1
- name: Use Node.js 22.x
uses: actions/setup-node@v5
with:
node-version: '22.x'
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run e2e tests
run: pnpm test:e2e
env:
CI: true
pack:
name: pack smoke (22.x)
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v5
with:
version: 10.28.1
- name: Use Node.js 22.x
uses: actions/setup-node@v5
with:
node-version: '22.x'
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'
- name: Build
run: pnpm build
- name: Pack smoke test
run: pnpm test:pack
env:
CI: true
audit:
name: audit (22.x)
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v5
with:
version: 10.28.1
- name: Use Node.js 22.x
uses: actions/setup-node@v5
with:
node-version: '22.x'
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'
- name: Security audit (high+)
# pnpm 10 still calls npm's retired audit endpoints. pnpm 11 uses the
# bulk advisories API; --pm-on-fail prevents the packageManager field
# from switching this one command back to pnpm 10.
run: pnpm dlx pnpm@11.13.1 --pm-on-fail=ignore audit --audit-level high
coverage:
name: coverage (22.x)
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v5
with:
version: 10.28.1
- name: Use Node.js 22.x
uses: actions/setup-node@v5
with:
node-version: '22.x'
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Coverage gate
run: pnpm test:coverage
env:
CI: true
- name: Upload coverage report
uses: actions/upload-artifact@v6
with:
name: coverage-report
path: coverage
if-no-files-found: error