Skip to content

chore: add go cache - #314

Open
joelmccoy wants to merge 1 commit into
mainfrom
add-go-cache
Open

chore: add go cache#314
joelmccoy wants to merge 1 commit into
mainfrom
add-go-cache

Conversation

@joelmccoy

@joelmccoy joelmccoy commented Aug 7, 2026

Copy link
Copy Markdown
Member

Description

Adds go caching across ci runs.

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Refactoring or maintenance

Checklist

  • Tests, documentation, and ADRs were added or updated as needed
  • Generated provider documentation is up to date
  • I followed the contributor guide

@joelmccoy
joelmccoy requested a review from a team as a code owner August 7, 2026 21:37
Copilot AI lite review requested due to automatic review settings August 7, 2026 21:37
@greptile-apps

greptile-apps Bot commented Aug 7, 2026

Copy link
Copy Markdown

Greptile Summary

The PR centralizes repository tool setup in a composite action and adds Go module and build-cache restoration across CI runs.

  • Adds a shared setup action that installs mise and caches Go modules and build artifacts.
  • Updates lint, acceptance-test, unit-test, and release jobs to use the shared action.

Confidence Score: 5/5

The 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

Filename Overview
.github/actions/setup/action.yml Adds a correctly scoped composite action for mise installation and platform-, architecture-, Go-version-, and dependency-aware Go caching.
.github/workflows/release.yml Replaces duplicated mise setup with the checked-out repository’s local setup action.
.github/workflows/test.yaml Reuses the shared setup action consistently across all three test jobs.

Reviews (1): Last reviewed commit: "chore: add go cache" | Re-trigger Greptile

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 runs mise and configures actions/cache for Go module/build caches.
  • Updated test workflow jobs (lint/acceptance/unit) to use the new setup action instead of repeating mise-action configuration.
  • Updated the release workflow 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants