chore: add go cache - #314
Conversation
Greptile SummaryThe PR centralizes repository tool setup in a composite action and adds Go module and build-cache restoration across CI runs.
Confidence Score: 5/5The PR appears safe to merge with no actionable defects identified in the changed CI paths. All current callers check out the repository before invoking the local composite action, mise installs the configured Go toolchain before cache discovery, and the Go caches remain safe across fallback restores because their contents are versioned or content-addressed. Important Files Changed
Reviews (1): Last reviewed commit: "chore: add go cache" | Re-trigger Greptile |
There was a problem hiding this comment.
Pull request overview
This PR centralizes tool setup in CI by introducing a reusable composite GitHub Action that installs repo tooling via mise and adds Go build/module caching, then updates existing workflows to use that shared setup step.
Changes:
- Added a new composite action (
.github/actions/setup) that runsmiseand configuresactions/cachefor Go module/build caches. - Updated
testworkflow jobs (lint/acceptance/unit) to use the new setup action instead of repeatingmise-actionconfiguration. - Updated the
releaseworkflow to use the same setup action for consistent tooling and Go caching.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.github/workflows/test.yaml |
Replaces repeated mise-action setup with shared .github/actions/setup in all test jobs. |
.github/workflows/release.yml |
Switches release job tooling setup to the shared composite action (enabling Go caching there too). |
.github/actions/setup/action.yml |
New composite action: installs tools via mise and restores/saves Go module/build caches keyed by OS/arch/Go version and go.sum. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| echo "version=$(go env GOVERSION)" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Cache Go modules and build artifacts | ||
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 |
There was a problem hiding this comment.
Could we restore the cache in the shared action, but save it only from the unit job after tests finish? Right now all jobs try to save the same cache, so some waste time and fail with cache reservation warnings.
Description
Adds go caching across ci runs.
Type of change
Checklist