Skip to content

Simplify the spawn logic #28

Simplify the spawn logic

Simplify the spawn logic #28

Workflow file for this run

name: CI
on: [push, pull_request]
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
build:
strategy:
matrix:
platform: [ubuntu-latest, windows-latest]
node-version: [18.x, 20.x, 21.x]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ env.node-version }}-npm-lock-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ env.node-version }}-npm-lock-
- name: Use Node.js ${{ env.node-version }}
uses: actions/setup-node@v3.6.0
with:
node-version: ${{ env.node-version }}
- name: Install dependencies
run: |
npm install
- name: Run tests
run: |
npm test