-
-
Notifications
You must be signed in to change notification settings - Fork 794
61 lines (46 loc) · 1.39 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: node.js
on:
push:
branches: [master]
pull_request:
branches: [master]
env:
FORCE_COLOR: 1
PRINT_OFFLINE_OUTPUT: 1
jobs:
build:
name: '[${{ matrix.os }}] node.js v${{ matrix.node-version }}'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
node-version: [14, 16, 18, 19]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- uses: actions/setup-go@v3
with:
go-version: '1'
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '8'
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
# install npm v8 on node.js v14 for package-lock v3 compatibility (npm v6 sems to have problems with it)
# use npm v8, issue with v9 on windows: https://github.com/actions/setup-node/issues/411#issuecomment-1025543081
# remove 'npm install' when node.js v14 support has ended
- if: matrix.node-version == '14'
run: npm install -global npm@8
- run: npm ci
- run: npm run prettier
- run: npm run lint
- run: npm test