Skip to content

Add GitHub action to lint, build and test #1

Add GitHub action to lint, build and test

Add GitHub action to lint, build and test #1

Workflow file for this run

name: Build 🛠️

Check failure on line 1 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build.yml

Invalid workflow file

`pull-request` is not a valid event name
on:
workflow_dispatch: # can call manually
push:
branches:
- master
pull-request:
jobs:
test:
name: Run the tests
strategy:
matrix:
node-version: ['18.x', '20.x']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run lint
- run: npm run build
- run: npm run test