Skip to content

Merge pull request #76 from nodech/fix-ci #55

Merge pull request #76 from nodech/fix-ci

Merge pull request #76 from nodech/fix-ci #55

Workflow file for this run

name: Node.js
on: [push, pull_request]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup
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
general:
name: Javascript & Bigint
runs-on: ubuntu-latest
strategy:
matrix:
node: [14.x, 16.x, 18.x, 20.x, 22.x]
script: [test-js, test-bigint]
steps:
- uses: actions/checkout@v4
- name: Setup
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
- name: ${{ matrix.script }}
run: npm run ${{ matrix.script }}
browser:
name: Browser
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup
uses: actions/setup-node@v4
with:
node-version: 22.x
- name: Install browserify tools
run: npm install --location=global browserify
- name: Install dependencies
run: npm install
- name: Browser
run: npm run test-browser
build-native:
name: Native
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
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@v4
- name: Setup
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
- name: Test Native
run: npm run test-native
build-torsion:
name: Native w/ Torsion
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
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@v4
- name: Setup
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
- name: Test libtorsion
run: npm run test-torsion