File: ci.yml

package info (click to toggle)
node-nan 2.24.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,188 kB
  • sloc: cpp: 8,007; ansic: 1,604; javascript: 1,588; makefile: 134; sh: 34
file content (52 lines) | stat: -rw-r--r-- 1,646 bytes parent folder | download
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
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
# https://github.com/actions/setup-node
# https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories

name: ci
on:
  push:
  #  branches: [main]
  pull_request:
  #  branches: [main]
  workflow_dispatch:
permissions:
  contents: read
jobs:
  pre-commit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: pre-commit/action@v3.0.1

  ci:
    strategy:
      fail-fast: false
      matrix:
        node-version: [25.x, 24.x, 23.x, 22.x, 21.x, 20.x, 19.x, 18.x, 17.x, 16.x]
        os: [windows-latest]
        include:
          - node-version: lts/*
            os: macos-15-intel  # macOS on Intel
          - node-version: lts/*
            os: macos-latest  # macOS on arm64
          - node-version: lts/*
            os: ubuntu-latest  # Linux on x64
          - node-version: lts/*
            os: ubuntu-24.04-arm  # Linux on arm64
          - node-version: lts/*
            os: windows-2025
          - node-version: lts/*
            os: windows-11-arm  # Windows on arm64
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: ${{ matrix.node-version }}
      - run: npm install
      # TODO: On Windows Node.js v11 these will fail but `make test` will succeed
      - if: matrix.node-version != '11.x'
        run: |
          npm run-script rebuild-tests
          npm test
      - run: make test