-
Notifications
You must be signed in to change notification settings - Fork 11
49 lines (40 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
48
49
name: Build Status
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
node-version: [8.3.0, 18.x]
fail-fast: false
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Setup Node
uses: volta-cli/[email protected]
- name: Switch Node version
run: volta pin node@${{ matrix.node-version }}
- name: Node.js version
run: node -v
- if: ${{ matrix.node-version == '18.x' }}
run: npm -v
# Node 8.3.0 comes with npm 5.3.0.
# npm 5.7.1 is the first version to support npm ci
- if: ${{ matrix.node-version != '18.x' }}
run: volta pin [email protected]
- run: npm install
- run: npm run e2e
# mock-fs dropped support for Node 10
- if: ${{ matrix.node-version == '18.x' }}
run: npm t
# ESLint 7+ uses `} catch {` which isn't supported in Node 8
- if: ${{ matrix.node-version == '18.x' }}
run: npm run lint