Skip to content

Commit

Permalink
ci: use yarn cache of node dependencies if present
Browse files Browse the repository at this point in the history
  • Loading branch information
Frazer Smith committed Jan 3, 2021
1 parent 3fb81e4 commit fe7171a
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 14.x
- name: Get Yarn Cache Directory Path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
-yarn-
- name: Install
run: yarn --frozen-lockfile
- name: Run ESLint
Expand All @@ -43,6 +53,16 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Get Yarn Cache Directory Path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
-yarn-
- name: Install
run: yarn --frozen-lockfile
- name: Install macOS dependencies
Expand Down

0 comments on commit fe7171a

Please sign in to comment.