8000 Add yarn cache · csit-github/docs.hackerone.com@fcda446 · GitHub
[go: up one dir, main page]

Skip to content

Commit fcda446

Browse files
Add yarn cache
1 parent aa65b71 commit fcda446

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/test-suite.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,18 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v1
15+
16+
- name: Get yarn cache directory path
17+
id: yarn-cache-dir-path
18+
run: echo "::set-output name=dir::$(yarn cache dir)"
19+
20+
- uses: actions/cache@v2
21+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
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-
1527
1628
- name: Set Node.js
1729
uses: actions/setup-node@master

0 commit comments

Comments
 (0)
0