Skip to content

ci: add yarn cache to backend CI build #82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
path: ${{ steps.yarn-cache-dir.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ matrix.node_version }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-${{ matrix.node_version }}-${{ hashFiles('**/yarn.lock') }}
${{ runner.os }}-yarn-${{ matrix.node_version }}-
${{ runner.os }}-yarn-

Expand Down Expand Up @@ -90,6 +91,21 @@ jobs:
${{ runner.os }}-go-${{ matrix.go_version }}-
${{ runner.os }}-go-

- name: get yarn cache dir
id: yarn-cache-dir
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: yarn cache
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir.outputs.dir }}
key: ${{ runner.os }}-yarn-12.x-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-12.x-${{ hashFiles('**/yarn.lock') }}
${{ runner.os }}-yarn-12.x-
${{ runner.os }}-yarn-

- name: setup go v${{ matrix.go_version }}
uses: actions/setup-go@v2
with:
Expand Down