-
Notifications
You must be signed in to change notification settings - Fork 12
55 lines (52 loc) · 1.41 KB
/
main.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
name: run-checks
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# Include all major maintenance + active LTS + current Node.js versions.
# https://github.com/nodejs/Release#release-schedule
node: [18, 20, 22]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js 22
uses: actions/setup-node@v3
with:
# Always build using the same Node.js version, to ensure consistent
# results from scripts/iu-mappings.js.
# This version should be the same as the one used in the
# publish-on-tag workflow.
node-version: 22
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Set up Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Test
run: npm test
node-6-compat:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js 6
uses: actions/setup-node@v3
with:
node-version: 6
- name: Install dependencies
run: npm install
- name: Install mocha 6
run: npm install mocha@6 -D --save
- name: Test
run: npm run test-node6