File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on : [push, pull_request]
4+
5+ jobs :
6+ build-node :
7+ runs-on : ${{ matrix.os }}
8+
9+ strategy :
10+ matrix :
11+ node-version : [8.x, 10.x, 12.x]
12+ os : [ubuntu-latest, macos-latest, windows-latest]
13+
14+ steps :
15+ - uses : actions/checkout@v1
16+ - name : Use Node.js ${{ matrix.node-version }}
17+ uses : actions/setup-node@v1
18+ with :
19+ node-version : ${{ matrix.node-version }}
20+ - name : Get npm cache directory
21+ id : npm-cache
22+ run : |
23+ echo "::set-output name=dir::$(npm config get cache)"
24+ - uses : actions/cache@v1
25+ with :
26+ path : ${{ steps.npm-cache.outputs.dir }}
27+ key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
28+ restore-keys : |
29+ ${{ runner.os }}-node-
30+ - name : npm install, build, and test
31+ run : |
32+ npm ci
33+ npm run build --if-present
34+ env :
35+ CI : true
You can’t perform that action at this time.
0 commit comments