Skip to content

Commit

Permalink
fix(github): hash only minimal cache key files
Browse files Browse the repository at this point in the history
We only need `packages/cosmic-swingset/go.sum` for Golang and
`yarn.lock` for Yarn.

Note that this is still expensive until actions/runner#319 is
fixed.
  • Loading branch information
michaelfig committed Feb 5, 2020
1 parent 2c88832 commit f79f976
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ag-solo-xs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
branches: [master]

jobs:
build:
xs-build:

runs-on: ubuntu-latest

Expand All @@ -20,7 +20,7 @@ jobs:
uses: actions/cache@v1
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: yarn install
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-all-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: actions/cache@v1
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Set up Go 1.13
Expand All @@ -28,7 +28,7 @@ jobs:
uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-go-${{ hashFiles('packages/cosmic-swingset/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
# 'yarn install' must be done at the top level, to build all the
Expand Down

0 comments on commit f79f976

Please sign in to comment.