-
Notifications
You must be signed in to change notification settings - Fork 10
55 lines (43 loc) · 1.38 KB
/
Copy pathbuild.yml
File metadata and controls
55 lines (43 loc) · 1.38 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
name: build
on:
push:
pull_request:
schedule:
- cron: "0 5 * * 1" # Every Monday at 5:00 UTC
jobs:
build:
strategy:
matrix:
virtual-environment: [ubuntu-latest, windows-2025, ubuntu-24.04-arm]
node: [18, 20, 22, 24, 26, latest]
nan-version: [nan-earliest, nan-latest]
exclude:
- virtual-environment: windows-2025
node: 18
- virtual-environment: windows-2025
node: 20
runs-on: ${{ matrix.virtual-environment }}
steps:
- name: Configure git (Windows specific)
if: matrix.virtual-environment == 'windows-2025'
run: git config --global core.autocrlf false
- name: Checkout
uses: actions/checkout@v6
- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node }}
- name: Install earliest nan dependency
shell: bash
if: matrix.nan-version == 'nan-earliest'
run: |
earliest_nan_version="$(npm pkg get dependencies | jq -r '.[] | ltrimstr("^")')"
echo "Installing nan version $earliest_nan_version"
npm install nan@"$earliest_nan_version"
- name: Install dependencies and build
run: |
npm install
- name: Run linter
run: node node_modules/eslint/bin/eslint .
- name: Run test suite
run: node node_modules/mocha/bin/mocha tests