@@ -2,35 +2,39 @@ name: Unit Tests
22on : [push, pull_request]
33jobs :
44 jest :
5- name : Node ${{ matrix.node_version }} on ${{ matrix.os }}
5+ name : Jest ( ${{ matrix.node_version}}- ${{ matrix.os }})
66 runs-on : ${{ matrix.os }}
77 strategy :
88 matrix :
99 node_version : [10, 12, 14]
1010 os : [ubuntu-latest, windows-latest, macos-latest]
1111 steps :
12- - uses : actions/checkout@v2
12+ - name : Checkout repository
13+ uses : actions/checkout@v2
1314 - name : Use node ${{ matrix.node_version }}
1415 uses : actions/setup-node@v1
1516 with :
1617 node-version : ${{ matrix.node_version }}
17- - name : Restore lerna cache
18+ - name : Restore cache
1819 uses : actions/cache@v2
1920 with :
2021 path : |
2122 node_modules
2223 */*/node_modules
23- key : ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
24+ key : ${{ matrix.os }}-${{ matrix.node_version}}-yarn-${{ hashFiles('**/yarn.lock') }}
25+ restore-keys : ${{ matrix.os }}-${{ matrix.node_version }}-yarn-
2426 - name : Install yarn dependencies
2527 run : yarn install
28+ - name : Bootstrap lerna packages
29+ run : yarn bootstrap
2630 - name : Jest with code coverage
27- if : ( matrix.node_version == 14 && matrix.os == 'ubuntu-latest')
31+ if : matrix.node_version == 14 && matrix.os == 'ubuntu-latest'
2832 uses : mattallty/jest-github-action@v1.0.3
2933 with :
3034 changes-only : true
3135 test-command : ' yarn test:coverage'
3236 env :
3337 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3438 - name : Jest
35- if : ( matrix.node_version != 14 || matrix.os != 'ubuntu-latest')
39+ if : matrix.node_version != 14 || matrix.os != 'ubuntu-latest'
3640 run : yarn jest
0 commit comments