Skip to content

chore(ci): use go tools for CI - #121

Merged
SVilgelm merged 4 commits into
mainfrom
chore/use-tools
Aug 27, 2025
Merged

SVilgelm merged 4 commits into
mainfrom
chore/use-tools

Conversation

@SVilgelm

@SVilgelm SVilgelm commented Aug 27, 2025 •

Copy link
Copy Markdown
Member

This pull request introduces a more robust and maintainable approach to managing Go-based CI tools and their dependencies. It achieves this by moving tool dependencies into a dedicated Go module under .github/tools/, updating CI workflows to use this new module, and adjusting dependency update automation accordingly.

Tool Dependency Management Improvements:

  • Added a new Go module file .github/tools/go.mod to centrally manage all Go-based CI tool dependencies, including golangci-lint and go-junit-report. This ensures consistent tool versions and easier updates.
  • Updated the main go.mod to require Go 1.24, aligning with the tooling requirements.

CI Workflow Enhancements:

  • Refactored the Lint job in .github/workflows/code.yaml to use the latest Go version (as determined by the GoVersions job) and to invoke golangci-lint via go tool -modfile=".github/tools/go.mod", ensuring it uses the versions specified in the new tools module.
  • Updated the UnitTestJob to run go-junit-report through the new tools module, ensuring consistent and reproducible test reporting.

Dependabot Configuration Updates:

  • Configured Dependabot to manage dependencies in .github/tools/ as a separate group (ci-tools), ensuring CI tool dependencies are kept up to date independently from the main project dependencies.

Add a minimal go.mod for the .github/tools module to declare Go 1.25
and allow Go tooling to be managed as a separate module.

Update .github/dependabot.yml to include the new gomod ecosystem for
the .github/tools directory and run weekly updates. This ensures
Dependabot scans and updates dependencies for CI/tooling in the new
tools module alongside existing GitHub Actions and repository deps.
Copilot AI review requested due to automatic review settings August 27, 2025 18:18

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 introduces a dedicated Go tools module to manage CI tooling dependencies deterministically. The change establishes a separate module for managing Go-based tooling independently from the main project dependencies.

  • Add a minimal Go tools module in .github/tools/go.mod declaring Go 1.25
  • Update Dependabot configuration to manage tooling dependencies in the new module with weekly updates
  • Modify CI workflow to use go tool -modfile for running go-junit-report from the pinned tools module

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
.github/tools/go.mod Creates new Go module for managing CI tooling dependencies
.github/dependabot.yml Adds gomod ecosystem monitoring for the tools directory and removes specific golangci-lint grouping
.github/workflows/code.yaml Updates go-junit-report execution to use the tools module via modfile flag

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread .github/workflows/code.yaml Resolved
Comment thread .github/workflows/code.yaml Resolved
Update the CI workflow to invoke go-junit-report using `go tool`
with an explicit `-modfile` pointing at `.github/tools/go.mod`. This
ensures the report tool is resolved and executed from the pinned tools
module instead of relying on a global `go install`, avoiding module
resolution and versioning inconsistencies in the runner environment.

Keep the test pipeline behavior the same (JSON test output -> junit.xml)
but make execution deterministic and reproducible across CI runs.
Update go.mod to require Go 1.24 instead of 1.22.
This brings the module in line with current development toolchains
and enables use of newer language and toolchain improvements.

Also preserve the retract directive noting that v0.3.0 was a mistaken
tag pointing to v0.2.2, keeping the module metadata accurate.
@SVilgelm SVilgelm changed the title chore(ci): use go tools chore(ci): use go tools for CI Aug 27, 2025
@SVilgelm
SVilgelm force-pushed the chore/use-tools branch 3 times, most recently from b2fb05b to d785417 Compare August 27, 2025 19:02
.github/tools/go.mod to declare the golangci-lint tool and
expand the indirect require block with many linting and analysis
dependencies. Bump the module Go version formatting to 1.24.0 and wrap
tool entries in a tool(...) block.

These changes add the golangci-lint CLI to the tools module and pin a
large set of analyzer plugins and helper packages so CI and local
developer tooling have reproducible, versioned dependencies for static
analysis and formatting. This ensures consistent linting behavior across
environments and avoids transient dependency issues.
@SVilgelm
SVilgelm merged commit dacb37a into main Aug 27, 2025
@SVilgelm
SVilgelm deleted the chore/use-tools branch August 27, 2025 19:08
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.

2 participants

⌂ 换网址