Skip to content
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

fix: lower cache usage by reusing more of the yarn caches #3162

Merged
merged 4 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
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
14 changes: 6 additions & 8 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,12 @@ jobs:
echo "terraform=/usr/local/share/.cache/terraform" >> $GITHUB_OUTPUT
mkdir -p /usr/local/share/.cache/go
echo "go=/usr/local/share/.cache/go" >> $GITHUB_OUTPUT
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
# only restore as an individual cache as per matrix explodes our cache usage
- uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: ${{ steps.global-cache-dir-path.outputs.yarn }}
# put matrix before integration to not restore caches from other sibling matrix jobs
key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-matrix-integration-${{ matrix.target }}
key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-integration
restore-keys: |
yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-integration
yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-
yarn-${{ runner.os }}-
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
Expand Down Expand Up @@ -187,13 +186,12 @@ jobs:
echo "terraform=/usr/local/share/.cache/terraform" >> $GITHUB_OUTPUT
mkdir -p /usr/local/share/.cache/go
echo "go=/usr/local/share/.cache/go" >> $GITHUB_OUTPUT
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
# only restore as an individual cache as per matrix explodes our cache usage
- uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: ${{ steps.global-cache-dir-path.outputs.yarn }}
# put matrix before integration to not restore caches from other sibling matrix jobs
key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-matrix-integration-${{ matrix.target }}
key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-integration
restore-keys: |
yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-integration
yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-
yarn-${{ runner.os }}-
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@ jobs:
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: ${{ steps.global-cache-dir-path.outputs.yarn }}
key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-unit-${{ inputs.package }}
key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-unit
restore-keys: |
yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-unit-
yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-
yarn-${{ runner.os }}-
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
Expand Down
Loading