Skip to content

ci: skip go mod download on cache hit for 9 jobs#24319

Merged
pelikhan merged 2 commits intomainfrom
copilot/ci-coach-skip-go-mod-download
Apr 3, 2026
Merged

ci: skip go mod download on cache hit for 9 jobs#24319
pelikhan merged 2 commits intomainfrom
copilot/ci-coach-skip-go-mod-download

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 3, 2026

9 jobs were unconditionally running go mod download even on warm Go module caches, wasting 10–30s per job. The if: steps.setup-go.outputs.cache-hit != 'true' guard (already present in test, integration, and fuzz) is now applied to the remaining jobs.

Jobs updated

update, build-wasm, bench, audit, actions-build, security, security-scan, cross-platform-build, alpine-container-test

Change

- name: Download dependencies with retry
+ if: steps.setup-go.outputs.cache-hit != 'true'
  run: |

go mod verify is left unconditional — it's fast and validates cache integrity without network I/O. All 12 Download dependencies with retry steps now have the guard.

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/d9b9b468-31ba-4257-9097-a33a20be2acd

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Optimize ci.yml to skip go mod download on cache hit ci: skip go mod download on cache hit for 9 jobs Apr 3, 2026
Copilot AI requested a review from pelikhan April 3, 2026 14:02
@pelikhan pelikhan marked this pull request as ready for review April 3, 2026 14:05
Copilot AI review requested due to automatic review settings April 3, 2026 14:05
@pelikhan pelikhan merged commit 7a356df into main Apr 3, 2026
51 checks passed
@pelikhan pelikhan deleted the copilot/ci-coach-skip-go-mod-download branch April 3, 2026 14:06
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the CI workflow to avoid unnecessary go mod download executions when the Go module cache is already warm, reducing wasted time across multiple jobs.

Changes:

  • Adds an if: steps.setup-go.outputs.cache-hit != 'true' guard to the remaining Download dependencies with retry steps.
  • Keeps go mod verify unconditional (where present) to validate cache integrity without network I/O.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

[ci-coach] ci: skip go mod download on cache hit for 9 jobs

3 participants