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 test
2+
3+ on :
4+ push : {}
5+ pull_request : {}
6+
7+ jobs :
8+ test :
9+ runs-on : ubuntu-latest
10+ strategy :
11+ matrix :
12+ # node-version: [10.x, 12.x, 14.x, 15.x]
13+ node-version : [10.x, 12.x, 14.x, 16.x]
14+ fail-fast : false
15+
16+ steps :
17+ - uses : actions/checkout@v2
18+
19+ - name : Use Node.js ${{ matrix.node-version }}
20+ uses : actions/setup-node@v1
21+ with :
22+ node-version : ${{ matrix.node-version }}
23+
24+ - name : Cache node modules
25+ uses : actions/cache@v2
26+ env :
27+ cache-name : cache-node-modules
28+ with :
29+ # npm cache files are stored in `~/.npm` on Linux/macOS
30+ path : ~/.npm
31+ key : ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
32+ restore-keys : |
33+ ${{ runner.os }}-build-${{ env.cache-name }}-
34+ ${{ runner.os }}-build-
35+ ${{ runner.os }}-
36+
37+ - name : Install dependencies
38+ run : npm ci
39+
40+ - name : Execute unit tests
41+ run : npm run test
You can’t perform that action at this time.
0 commit comments