• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

strongo / cli-helpers / 34338505766
100%

Build:
DEFAULT BRANCH: main
Ran 09 Sep 2026 10:07AM UTC
Jobs 1
Files 27
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

09 Sep 2026 10:07AM UTC coverage: 100.0%. Remained the same
34338505766

push

github

web-flow
ci: verify go.mod tidiness instead of silently imposing it (#13)

Closes the mechanism behind datatug-cli's `v0.13.2` in this repo.
Companion to datatug/datatug-cli#189, where it was first fixed.

## The problem

GoReleaser's before-hook ran a **mutating** `go mod tidy`. That rewrites
`go.mod` inside the ephemeral release runner, so a release can build and
publish something other than the tagged tree, leaving no trace.

`datatug-cli` shipped exactly that. Two Renovate pull requests for the
same `go-github` major interleaved and left `go.mod` requiring v91 while
every source file still imported v90. The hook re-added v90 in the
runner:

```
$ go version -m datatug   # from the published v0.13.2 tarball
dep  github.com/google/go-github/v90  v90.0.0     # while go.mod declared v91
```

Every consumer of the shared release workflow except `datatug-cli` still
runs that hook.

## The two guards

Both report rather than rewrite, which is the whole point:

| Change | Effect |
|---|---|
| `.goreleaser`: `go mod tidy` → `go mod tidy -diff` | drift stops the
release instead of being healed out from under the tag |
| new `go.mod is tidy` CI job | drift goes red on the pull request that
introduces it |

The CI job matters independently. Build-and-test only catches stale
imports once **both** of an interleaved pair have merged. An untidy
`go.mod` is visible on the **first one alone** — it would have failed
the earlier of the two Renovate pull requests, before they could
collide.

That job also sits in the workflow named by `release.yml`'s
`require_workflow_success`, so drift blocks the release as well as the
merge.

## Verification

`go mod tidy -diff` exits 0 on this branch and `go build ./...` passes.
The guard was verified in both directions on `datatug-cli`: exit 1 on
the commit that shipped the broken release, exit 0 once fixed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

3722 of 3722 relevant lines covered (100.0%)

1.01 hits per line

Jobs
ID Job ID Ran Files Coverage
1 34338505766.1 09 Sep 2026 10:07AM UTC 27
100.0
GitHub Action Run
Source Files on build 34338505766
  • Tree
  • List 27
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • f6c229aa on github
  • Prev Build on main (#34330436995)
  • Next Build on main (#34377865575)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc