Skip to content

Commit

Permalink
Merge pull request #76 from nodech/fix-ci
Browse files Browse the repository at this point in the history
ci: update versions and fix node v14.
  • Loading branch information
chjj authored Jan 15, 2025
2 parents 14ee01b + 351ae11 commit d8d38c2
Showing 1 changed file with 45 additions and 15 deletions.
60 changes: 45 additions & 15 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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
Expand All @@ -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

Expand All @@ -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

Expand Down

0 comments on commit d8d38c2

Please sign in to comment.