Skip to content

ci: improve Go caching #7954

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 27 commits into from
Jun 12, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fixup! Reduce thrashing
  • Loading branch information
ammario committed Jun 10, 2023
commit cc8700040aca112a1bc5523411737a8da5ce89a8
6 changes: 2 additions & 4 deletions .github/actions/setup-go/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,10 @@ runs:
with:
path: |
${{ steps.get_cache_dirs.outputs.go-mod-cache }}}
key: gomodcache-${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
key: gomodcache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}-${{ github.job }}
restore-keys: |
gomodcache-${{ runner.os }}-${{ github.job }}-
gomodcache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}-
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GOCACHE also has the github.job one listed

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a comment that may help this make more sense

gomodcache-${{ runner.os }}-
gomodcache-

- name: Cache $GOCACHE
uses: buildjet/cache@v3
Expand All @@ -53,7 +52,6 @@ runs:
restore-keys: |
gocache-${{ runner.os }}-${{ github.job }}-
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hyphen at the end?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was on purpose. It's how I've seen it done on a few docs. I guess it clearly symbolizes the end of a token.

gocache-${{ runner.os }}-
gocache-

- name: Install gotestsum
shell: bash
Expand Down