generated from boneskull/boneskull-template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (35 loc) · 1.19 KB
/
nodejs.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
31
32
33
34
35
36
37
name: Node CI
on: [push, pull_request]
jobs:
build:
name: Node.js v${{ matrix.node_version }} / ${{ matrix.os }}
runs-on: ubuntu-latest
strategy:
matrix:
node_version: [18, 20]
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: ${{ matrix.node_version }}
- name: Upgrade npm
run: npm i -g npm
- name: Install dependencies
uses: bahmutov/npm-install@3da6b44b121fcdcb64528100e3dcfaffb39159e5 # v1.8.40
with:
install-command: npm ci --foreground-scripts
- name: Test Suite
run: npm run test:ci
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Install dependencies
uses: bahmutov/npm-install@3da6b44b121fcdcb64528100e3dcfaffb39159e5 # v1.8.40
with:
install-command: npm ci --foreground-scripts
- name: Lint
run: npm run lint