Skip to content

CI: split install target so build/test/lint don't reinstall tools on every run #37

@HarryCampion

Description

@HarryCampion

Problem

build depends on install, which runs 8+ go install @latest calls (golangci-lint, govulncheck, gosec, gotestsum, gomarkdoc, goreleaser, syft, goimports) on every invocation. Every CI job that calls make test, make lint, or make build pays this cost unless a GOPATH/bin cache is warm, adding ~2–3 min per job unnecessarily.

A downstream project has worked around this by caching ~/go/bin in GitHub Actions workflows, but the root issue is in bootstrap.mk.

Suggestion

Split install into two targets:

  • install-depsgo mod download + go mod tidy only
  • install-tools — all go install dev tool installs

build should depend only on install-deps. install can remain as a convenience target that calls both.

CI can then cache the tools layer (keyed on go.sum) independently from module deps, and tool reinstalls become a true cache-miss event rather than the default path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions