|
14 | 14 | uses: actions/setup-node@v1 |
15 | 15 | with: |
16 | 16 | node-version: ${{ matrix.node-version }} |
| 17 | + - name: Config yarn cache |
| 18 | + id: yarn-cache-dir-path |
| 19 | + run: echo "::set-output name=dir::$(yarn cache dir)" |
| 20 | + - uses: actions/cache@v1 |
| 21 | + id: yarn-cache |
| 22 | + with: |
| 23 | + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} |
| 24 | + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} |
| 25 | + restore-keys: | |
| 26 | + ${{ runner.os }}-yarn- |
17 | 27 | - name: lint |
18 | 28 | run: | |
19 | 29 | yarn install --frozen-lockfile |
|
31 | 41 | uses: actions/setup-node@v1 |
32 | 42 | with: |
33 | 43 | node-version: ${{ matrix.node-version }} |
| 44 | + - name: Config yarn cache |
| 45 | + id: yarn-cache-dir-path |
| 46 | + run: echo "::set-output name=dir::$(yarn cache dir)" |
| 47 | + - uses: actions/cache@v1 |
| 48 | + id: yarn-cache |
| 49 | + with: |
| 50 | + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} |
| 51 | + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} |
| 52 | + restore-keys: | |
| 53 | + ${{ runner.os }}-yarn- |
34 | 54 | - name: test |
35 | 55 | run: | |
36 | 56 | yarn install --frozen-lockfile |
|
48 | 68 | uses: actions/setup-node@v1 |
49 | 69 | with: |
50 | 70 | node-version: ${{ matrix.node-version }} |
| 71 | + - name: Config yarn cache |
| 72 | + id: yarn-cache-dir-path |
| 73 | + run: echo "::set-output name=dir::$(yarn cache dir)" |
| 74 | + - uses: actions/cache@v1 |
| 75 | + id: yarn-cache |
| 76 | + with: |
| 77 | + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} |
| 78 | + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} |
| 79 | + restore-keys: | |
| 80 | + ${{ runner.os }}-yarn- |
51 | 81 | - name: build |
52 | 82 | run: | |
53 | 83 | yarn install --frozen-lockfile |
|
65 | 95 | uses: actions/setup-node@v1 |
66 | 96 | with: |
67 | 97 | node-version: ${{ matrix.node-version }} |
| 98 | + - name: Config yarn cache |
| 99 | + id: yarn-cache-dir-path |
| 100 | + run: echo "::set-output name=dir::$(yarn cache dir)" |
| 101 | + - uses: actions/cache@v1 |
| 102 | + id: yarn-cache |
| 103 | + with: |
| 104 | + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} |
| 105 | + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} |
| 106 | + restore-keys: | |
| 107 | + ${{ runner.os }}-yarn- |
68 | 108 | - name: build |
69 | 109 | run: | |
70 | 110 | yarn install --frozen-lockfile |
|
0 commit comments