fix(build): gate the tools module read-only in task check
Nothing in the delivery gate entered tools/, so its dependency drift was only ever discovered by a command that silently repaired it, dirtying the tree with an unrelated diff. task check now runs test:tools. -mod=readonly is passed explicitly on every documented tools command: a developer's global GOFLAGS=-mod=mod in go env overrides the toolchain default and re-enables the rewrite. Also corrects the archie-build-and-env coverage table, which claimed task check omits task lint.
This commit is contained in:
1 parent
c12f6865d7
commit
27203c6523
4 files changed
+38
-10
No files matched your search
+19
-1
@@ -206,8 +206,22 @@ tasks:
|
||||
cmds:
|
||||
- go test ./... -count=1
|
||||
|
||||
test:tools:
|
||||
desc: Run the nested tools module suite, refusing to rewrite its go.mod
|
||||
summary: |
|
||||
tools/go.mod replaces the root module, so its build list must satisfy
|
||||
the root module's requirements. When the root moves on, the tools module
|
||||
goes stale and any plain go command there rewrites tools/go.mod and
|
||||
tools/go.sum to catch up, leaving an unrelated dirty diff.
|
||||
|
||||
-mod=readonly is explicit because a developer's global GOFLAGS=-mod=mod
|
||||
overrides the toolchain default and re-enables the silent rewrite.
|
||||
Fix a failure here with: go -C tools mod tidy
|
||||
cmds:
|
||||
- go -C tools test -mod=readonly ./... -count=1
|
||||
|
||||
check:
|
||||
desc: "Full quality gate: fmt, go fix, proto, vet, lint, build, test, ui tests"
|
||||
desc: "Full quality gate: fmt, go fix, proto, vet, lint, build, test, tools tests, ui tests"
|
||||
cmds:
|
||||
- task: fmt
|
||||
- go fix ./...
|
||||
@@ -217,6 +231,10 @@ tasks:
|
||||
- task: lint
|
||||
- task: build
|
||||
- task: test
|
||||
# The tools module is not covered by ./... from the root; without this
|
||||
# its dependency drift is only ever discovered by a command that
|
||||
# silently repairs it.
|
||||
- task: test:tools
|
||||
# The dashboard's suite runs here too. Left out of the gate it rots
|
||||
# silently: nothing else executes it, so a broken DOM primitive ships.
|
||||
- task: test:ui
|
||||
|
||||
Reference in new issue
Block a user