Migrate away from node fetch #230
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Alks.js Build and Test | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x, 20.x, 22.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
# If this step is failing with an E401, it's probably because the package-lock.json is specifying dependencies that are not available in the public npm registry | |
# (which would happen if your local NPM is set up to use the CoxAuto private NPM registry). To fix this, delete the node_modules folder and package-lock.json | |
# files, and then run `npm i --registry https://registry.npmjs.org` locally. This will generate a new package-lock.json file that only references packages | |
# available in the public npm registry. | |
- name: Install dependencies | |
run: npm ci | |
- run: npm run build --if-present | |
- name: Run tests | |
run: npm test |