1212 CI : true
1313 FORCE_COLOR : 2
1414
15-
1615jobs :
17- run :
18- name : Node ${{ matrix.node }} on ${{ matrix.os }}
16+ pipeline :
17+ name : Node ${{ matrix.node-version }} on ${{ matrix.os }}
1918 runs-on : ${{ matrix.os }}
2019
2120 strategy :
2221 fail-fast : false
2322 matrix :
24- node : ["10.x", "12.x", "14.x" ]
25- os : [" ubuntu-latest" ]
23+ node-version : ['16.x' ]
24+ os : [' ubuntu-latest' ]
2625
2726 steps :
28- - uses : actions/checkout@v2.3.4
27+ - uses : actions/checkout@v3
2928 - name : Use Node.js ${{ matrix.node-version }}
30- uses : actions/setup-node@v2.1.4
29+ uses : actions/setup-node@v2
3130 with :
3231 node-version : ${{ matrix.node-version }}
3332
33+ - name : Get yarn cache directory path
34+ id : yarn-cache-dir-path
35+ run : echo "::set-output name=dir::$(yarn cache dir)"
3436
35- - name : Get npm cache directory
36- id : npm-cache-dir
37- run : |
38- echo "::set-output name=dir::$(npm config get cache)"
39- - uses : actions/cache@v2
40- id : npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
37+ - uses : actions/cache@v3
38+ id : yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
4139 with :
42- path : ${{ steps.npm -cache-dir.outputs.dir }}
43- key : ${{ runner.os }}-node -${{ hashFiles('**/package-lock.json ') }}
40+ path : ${{ steps.yarn -cache-dir-path .outputs.dir }}
41+ key : ${{ runner.os }}-yarn -${{ hashFiles('**/yarn.lock ') }}
4442 restore-keys : |
45- ${{ runner.os }}-node-
46-
47-
48- - name : npm install, build, and test
49- run : |
50- npm install
51- npm run ci
52- env :
53- CI : true
43+ ${{ runner.os }}-yarn-
44+ - name : Install project dependencies
45+ run : yarn --prefer-offline
46+ id : install
47+
48+ - name : Install project dependencies
49+ run : yarn run build
50+ id : production
0 commit comments