-
-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (30 loc) · 945 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# This workflow will do a clean installation of node dependencies, build the source code and run tests across different node versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Node.js CI
on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
jobs:
build:
name: Node ${{ matrix.node }}
runs-on: ubuntu-latest
strategy:
matrix:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
node: [18, 20, 21, 22]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Clean install
run: npm ci
- name: Run linter
run: npm run lint
- name: Run tests
run: npm run test