-
Notifications
You must be signed in to change notification settings - Fork 57
34 lines (29 loc) · 932 Bytes
/
Copy pathnodejs.yml
File metadata and controls
34 lines (29 loc) · 932 Bytes
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
name: Node CI
on: [push]
permissions:
contents: read
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: [20.x, 22.x, 24.x]
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
with:
egress-policy: audit
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build, and test
run: |
npx npm@latest install -g npm@11
npm ci
npm run build --if-present
npm run test
env:
CI: true