Skip to content

Commit 8090a69

Browse files
authored
feat: add cache for CI (conwnet#182)
1 parent 1725fcd commit 8090a69

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,18 @@ jobs:
2222
uses: actions/setup-node@v1
2323
with:
2424
node-version: ${{ matrix.node-version }}
25+
26+
- name: Get yarn cache directory path
27+
id: yarn-cache-dir-path
28+
run: echo "::set-output name=dir::$(yarn cache dir)"
29+
30+
- uses: actions/cache@v2
31+
with:
32+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
33+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-${{ matrix.node-version }}
34+
restore-keys: |
35+
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-${{ matrix.node-version }}
36+
2537
- run: yarn --frozen-lockfile
2638
- run: yarn eslint
2739
- run: yarn build

0 commit comments

Comments
 (0)