diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 9afdc48b..0309683b 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -7,15 +7,18 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 22.x - name: Install tools run: npm install --location=global bslint + - name: Install bslint extra + run: npm install bslint-extra + - name: Lint run: npm run lint @@ -24,15 +27,21 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [18.x, 20.x] + node: [14.x, 16.x, 18.x, 20.x, 22.x] script: [test-js, test-bigint] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} + # Pythong 3.10->3.11 broke node-gyp. This upgrades node-gyp for older nodejs. + # https://github.com/nodejs/node-gyp/issues/2219 + - name: Update npm. + if: contains(matrix.node, '14.x') + run: npm i -g npm@9 + - name: Install dependencies run: npm install @@ -44,11 +53,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node }} + node-version: 22.x - name: Install browserify tools run: npm install --location=global browserify @@ -59,21 +68,31 @@ jobs: - name: Browser run: npm run test-browser - build-native: name: Native runs-on: ${{ matrix.os }} strategy: matrix: os: [macos-latest, ubuntu-latest] - node: [18.x, 20.x] + node: [14.x, 16.x, 18.x, 20.x, 22.x] + exclude: + - os: macos-latest + node: 14.x + - os: macos-latest + node: 16.x steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} + # Pythong 3.10->3.11 broke node-gyp. This upgrades node-gyp for older nodejs. + # https://github.com/nodejs/node-gyp/issues/2219 + - name: Update npm. + if: contains(matrix.node, '14.x') + run: npm i -g npm@9 + - name: Install & Build run: npm install @@ -86,14 +105,25 @@ jobs: strategy: matrix: os: [macos-latest, ubuntu-latest] - node: [18.x, 20.x] + node: [14.x, 16.x, 18.x, 20.x, 22.x] + exclude: + - os: macos-latest + node: 14.x + - os: macos-latest + node: 16.x steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} + # Pythong 3.10->3.11 broke node-gyp. This upgrades node-gyp for older nodejs. + # https://github.com/nodejs/node-gyp/issues/2219 + - name: Update npm. + if: contains(matrix.node, '14.x') + run: npm i -g npm@9 + - name: Install & Build run: npm install