Skip to content

feat: add test github ci #1

feat: add test github ci

feat: add test github ci #1

Workflow file for this run

name: Test CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
test:
name: Test on Node.js ${{ matrix.node-version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node-version: [16.x, 18.x, 20.x]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
cache: 'npm'
node-version: ${{ matrix.node-version }}
# Use separate run commands so command status handled correctly on Windows
- name: npm install
run: npm ci
- name: npm test
run: npm test
- name: npm run lint
run: npm run lint