-
Notifications
You must be signed in to change notification settings - Fork 14
80 lines (76 loc) · 2.93 KB
/
Copy pathnodejs.yml
File metadata and controls
80 lines (76 loc) · 2.93 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
# This is a generated file. Please change .github/workflows/nodejs.yml.in
# and run the following command to update the GHA Workflow
# $> npm run update-gha-workflow
# --------------------
on: [pull_request]
name: CI
defaults:
run:
shell: bash
jobs:
test-posix:
name: Unix tests
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
node-version: [20.x, 22.x, 24.x, 26.x]
test-to-run: ["works in a simple case","works with a Nan addon","works with a N-API addon","passes through env vars and runs the pre-compile hook","works with code caching support","works with snapshot support (compressBlobs = "]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6
with:
check-latest: true
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm install
- name: Lint
run: npm run lint
- name: Build
run: npm run build
- name: Test
run: npm run test-ci -- -f "${{ matrix.test-to-run }}"
test-windows:
name: Windows tests
strategy:
fail-fast: false
matrix:
target:
- { node: 20.x, os: windows-2022, vs-version: '17', configure-args: vs2022 }
- { node: 22.x, os: windows-2022, vs-version: '17', configure-args: vs2022 }
- { node: 24.x, os: windows-2022, vs-version: '17', configure-args: vs2022 }
- { node: 26.x, os: windows-latest, vs-version: '18', configure-args: vs2026 }
test-to-run: ["works in a simple case","works with a Nan addon","works with a N-API addon","passes through env vars and runs the pre-compile hook","works with code caching support","works with snapshot support (compressBlobs = "]
runs-on: ${{ matrix.target.os }}
steps:
- uses: actions/checkout@v5
- name: Use Node.js ${{ matrix.target.node }}
uses: actions/setup-node@v6
with:
check-latest: true
node-version: ${{ matrix.target.node }}
- uses: microsoft/setup-msbuild@v2
name: Setup MSBuild
with:
vs-version: ${{ matrix.target.vs-version }}
msbuild-architecture: x64
# The windows-2022 runner image does not ship NASM, which Node's OpenSSL
# asm build requires. find_nasm.cmd picks it up from %ProgramFiles%\NASM,
# which is where choco installs it, so no PATH changes are needed.
- name: Install NASM
run: choco install nasm --no-progress -y
- name: Install Dependencies
run: |
npm install --ignore-scripts
npm rebuild
- name: Lint
run: npm run lint
- name: Build
run: npm run build
- name: Test
run: npm run test-ci -- -f "${{ matrix.test-to-run }}"
env:
BOXEDNODE_MAKE_ARGS: "debug"
BOXEDNODE_CONFIGURE_ARGS: ${{ matrix.target.configure-args }}