forked from typicode/husky
47 lines (43 loc) 路 1.13 KB
/
node.js.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
38
39
40
41
42
43
44
45
46
47
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on: [push]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [14, 16, 18]
os: [ubuntu-latest, macOS-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
<<<<<<< HEAD
- run: npm --version
=======
<<<<<<< HEAD
- run: npm --version
=======
- name: npm 7
run: npm i -g npm@7
>>>>>>> upstream/fix-ci
>>>>>>> 364de37ca2f0a20a802c02caf4798e3f78487f31
- run: npm ci --ignore-scripts
- run: npm test
# Node 14 comes with npm 6 which has issues on Windows
# Skipping tests on Windows with Node 14
build-windows:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [16, 18]
os: [windows-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm --version
- run: npm ci --ignore-scripts
- run: npm test