File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - " **"
7+ push :
8+ branches :
9+ - main
10+
11+ jobs :
12+ build :
13+ runs-on : ubuntu-latest
14+
15+ strategy :
16+ matrix :
17+ node-version : [12.x, 14.x, 16.x]
18+
19+ steps :
20+ - uses : actions/checkout@v1
21+ - name : Use Node.js ${{ matrix.node-version }}
22+ uses : actions/setup-node@v1
23+ with :
24+ node-version : ${{ matrix.node-version }}
25+ - name : Cache node modules
26+ uses : actions/cache@v1
27+ env :
28+ cache-name : cache-node-modules
29+ with :
30+ path : ~/.npm
31+ # This uses the same name as the build-action so we can share the caches.
32+ key : ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
33+ restore-keys : |
34+ ${{ runner.os }}-build-${{ env.cache-name }}-
35+ ${{ runner.os }}-build-
36+ ${{ runner.os }}-
37+ - run : npm ci --ignore-scripts
38+ - name : npm build and test
39+ run : npm test
You can’t perform that action at this time.
0 commit comments