This repository was archived by the owner on Jul 8, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44name : Node.js CI
55
66on :
7- push :
8- branches : [ master ]
9- pull_request :
10- branches : [ master ]
7+ push :
8+ branches : [master]
9+ pull_request :
10+ branches : [master]
1111
1212jobs :
13- build :
14-
15- runs-on : ubuntu-latest
16-
17- strategy :
18- matrix :
19- node-version : [14.x]
20-
21- steps :
22- - uses : actions/checkout@v2
23- - name : Use Node.js ${{ matrix.node-version }}
24- uses : actions/setup-node@v2
25- with :
26- node-version : ${{ matrix.node-version }}
27- cache : ' npm'
28- - run : npm install
29- - run : npm run build --if-present
30- - run : npm test
13+ build :
14+ runs-on : ubuntu-latest
15+
16+ strategy :
17+ matrix :
18+ node-version : [14.x]
19+
20+ steps :
21+ - uses : actions/checkout@v2
22+
23+ - name : Use Node.js ${{ matrix.node-version }}
24+ uses : actions/setup-node@v2
25+ with :
26+ node-version : ${{ matrix.node-version }}
27+ cache : " npm"
28+
29+ - name : cache node modules
30+ uses : actions/cache@v2
31+ env :
32+ cache-name : cache-node-modules
33+ with :
34+ path : ~/.npm
35+ key : ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
36+ restore-keys : |
37+ ${{ runner.os }}-build-${{ env.cache-name }}-
38+ ${{ runner.os }}-build-
39+ ${{ runner.os }}-
40+
41+ - name : Install Dependencies
42+ run : npm install
43+ - name : Build
44+ run : npm run build --if-present
45+ - name : Test
46+ run : npm test
Original file line number Diff line number Diff line change 88 "dev" : " NODE_ENV=development nodemon --watch 'src/**/*.ts' --exec 'ts-node' src/server.ts" ,
99 "prebuild" : " rm -rf dist/ && prettier --write src/" ,
1010 "build" : " tsc" ,
11- "test" : " NODE_ENV=test jest --forceExit --coverage --verbose"
11+ "test" : " NODE_ENV=test jest --forceExit --coverage --verbose" ,
12+ "publish" : " git push heroku master" ,
13+ "log" : " heroku log -t"
1214 },
1315 "devDependencies" : {
1416 "@types/axios" : " ^0.14.0" ,
You can’t perform that action at this time.
0 commit comments