Skip to content

Commit 13af565

Browse files
aledbfclaude
andcommitted
build(tasks): run go-tools' task installed outside go.mod
go.mod pinned github.com/spin-stack/go-tools/cmd/task as a tool, so every go-tools release this repository wanted - a new Task, a shared task, a gate - was a go.mod bump and a pull request here, and in every other spin-stack repository. Task is now go-tools' cmd/task installed outside the module: each workflow job (and the setup-parity-runtime composite) uses spin-stack/go-tools before its first `task`, which puts the latest release's task on PATH, and Dependabot moves that pin with the other actions. On a laptop, `go install github.com/spin-stack/go-tools/cmd/task@latest` once. Every `go tool task` becomes `task`. go-tools stays a requirement, at v0.20261128.1, for versions/gate, whose gate counts the action as reading versions.yaml. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent b5a4bfa commit 13af565

17 files changed

Lines changed: 95 additions & 76 deletions

File tree

‎.github/actions/setup-parity-runtime/action.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ runs:
1111
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7
1212
with:
1313
go-version-file: go.mod
14+
- uses: spin-stack/go-tools@116dfa6befab594f25ad4553e375061e3fa80f27 # v20261128.01
1415
# pnpm installs the reference, through the firewall (task reference).
1516
- uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
1617
with:
@@ -21,7 +22,7 @@ runs:
2122
# Free disk, enable the containerd image store (build-cache export) and turn
2223
# bake's filesystem entitlement off. Reuses the Taskfile so the runner prep
2324
# is identical to release.yml.
24-
- run: go tool task ci:prepare-runner
25+
- run: task ci:prepare-runner
2526
shell: bash
26-
- run: go tool task reference
27+
- run: task reference
2728
shell: bash

‎.github/deadcode-allow.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# Functions no binary reaches that are correct for ever, one `<symbol> # why` a line (go tool deadgate -allow).
1+
# Functions no binary reaches that are correct for ever, one `<symbol> # why` a line (deadgate -allow).
22
# An entry that matches nothing fails, so the list only shrinks.
33
package internal/tsoracle/oracletest # test helper: the Go tests assert their ports against the testdata/ts-oracle goldens with it; no binary should link it

‎.github/deadcode-pending.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# Functions no binary reaches whose deletion somebody owes, one `<symbol> # why` a line (go tool deadgate -pending).
1+
# Functions no binary reaches whose deletion somebody owes, one `<symbol> # why` a line (deadgate -pending).
22
# Printed on every green run; an entry that matches nothing fails.

‎.github/testquality-allow.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Tests testquality reports that are kept on purpose, one <package>:<TestName> a line with why
2-
# (go tool testquality -allow). An entry that matches nothing fails, so the list only shrinks.
2+
# (testquality -allow). An entry that matches nothing fails, so the list only shrinks.
33
github.com/devcontainers/cli/internal/exec:TestHelperProcess # the child process OSRunner tests exec; it asserts nothing by design, the parent tests do

‎.github/workflows/go-cli.yml‎

Lines changed: 43 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,13 @@ jobs:
5454
- uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7
5555
with:
5656
go-version-file: go.mod
57+
# Task and every go-tools command, from go-tools' latest release, before any job's first
58+
# `task`: no go.mod pins them, and an older pin of this action installs the same release.
59+
- uses: spin-stack/go-tools@116dfa6befab594f25ad4553e375061e3fa80f27 # v20261128.01
5760
- name: What this change broke, and whether a test noticed
5861
env:
5962
BASE: origin/${{ github.base_ref }}
60-
run: go tool task mutate
63+
run: task mutate
6164

6265
lint-and-test:
6366
runs-on: ubuntu-latest
@@ -73,6 +76,7 @@ jobs:
7376
- uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7
7477
with:
7578
go-version-file: go.mod
79+
- uses: spin-stack/go-tools@116dfa6befab594f25ad4553e375061e3fa80f27 # v20261128.01
7680

7781
# golangci-lint's analysis of each package, which setup-go does not keep, keyed by content
7882
# inside, so any older copy is safe to start from: saved under the commit, restored from the
@@ -84,17 +88,17 @@ jobs:
8488
key: golangci-lint-${{ github.sha }}
8589
restore-keys: golangci-lint-
8690

87-
- run: go tool task lint
88-
- run: go tool task spec:compliance
89-
- run: go tool task vuln
90-
- run: go tool task test:race
91-
- run: go tool task coverage
91+
- run: task lint
92+
- run: task spec:compliance
93+
- run: task vuln
94+
- run: task test:race
95+
- run: task coverage
9296
- name: Coverage summary
9397
if: always()
94-
run: go tool task coverage:summary SRC=coverage.out TITLE="unit (hermetic)"
95-
- run: go tool task test:integration
96-
- run: go tool task build
97-
- run: go tool task build:smoke
98+
run: task coverage:summary SRC=coverage.out TITLE="unit (hermetic)"
99+
- run: task test:integration
100+
- run: task build
101+
- run: task build:smoke
98102

99103
# Binary covdata for the cross-lane merge (coverage-report job).
100104
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
@@ -114,19 +118,20 @@ jobs:
114118
- uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7
115119
with:
116120
go-version-file: go.mod
121+
- uses: spin-stack/go-tools@116dfa6befab594f25ad4553e375061e3fa80f27 # v20261128.01
117122

118-
- run: go tool task coverage:e2e
123+
- run: task coverage:e2e
119124
- name: Coverage summary
120125
if: always()
121-
run: go tool task coverage:summary SRC=artifacts/coverage/data/e2e TITLE=e2e
126+
run: task coverage:summary SRC=artifacts/coverage/data/e2e TITLE=e2e
122127
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
123128
if: always()
124129
with:
125130
name: covdata-e2e
126131
path: artifacts/coverage/data/e2e
127132
if-no-files-found: error
128133
- if: always()
129-
run: go tool task clean
134+
run: task clean
130135

131136
# Hermetic parity gate: read-configuration golden comparison + the contract
132137
# lane of the parity matrix (flag validation / output contract, no Docker).
@@ -143,6 +148,7 @@ jobs:
143148
- uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7
144149
with:
145150
go-version-file: go.mod
151+
- uses: spin-stack/go-tools@116dfa6befab594f25ad4553e375061e3fa80f27 # v20261128.01
146152
# pnpm installs the reference, through the firewall (task reference); pnpm 11 needs Node 22.13+.
147153
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
148154
with:
@@ -151,18 +157,18 @@ jobs:
151157
with:
152158
node-version: "24"
153159

154-
- run: go tool task reference
155-
- run: go tool task parity:contract
156-
- run: go tool task parity:network
160+
- run: task reference
161+
- run: task parity:contract
162+
- run: task parity:network
157163
# Coverage is measured separately with an instrumented Go binary. Keep the
158164
# functional parity run above release-like, and avoid conflating subprocess
159165
# coverage with the hermetic unit profile.
160-
- run: go tool task coverage:parity-contract
166+
- run: task coverage:parity-contract
161167
- name: Coverage summary
162168
if: always()
163-
run: go tool task coverage:summary SRC=artifacts/coverage/data/contract TITLE=parity:contract
169+
run: task coverage:summary SRC=artifacts/coverage/data/contract TITLE=parity:contract
164170
- if: always()
165-
run: go tool task reference:commit
171+
run: task reference:commit
166172
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
167173
if: always()
168174
with:
@@ -191,8 +197,9 @@ jobs:
191197
- uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7
192198
with:
193199
go-version-file: go.mod
200+
- uses: spin-stack/go-tools@116dfa6befab594f25ad4553e375061e3fa80f27 # v20261128.01
194201
- id: check
195-
run: go tool task ci:daily-changes
202+
run: task ci:daily-changes
196203

197204
# Single sharded runtime parity matrix, parameterized by event:
198205
# push/PR — SCOPED to the commands the diff can affect (devtool parity-affected),
@@ -242,30 +249,31 @@ jobs:
242249
- uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7
243250
with:
244251
go-version-file: go.mod
252+
- uses: spin-stack/go-tools@116dfa6befab594f25ad4553e375061e3fa80f27 # v20261128.01
245253
- name: Plan this run
246254
id: plan
247255
# A pull request's diff is its base..head; a push's, what it moved the branch from..to.
248256
env:
249257
DIFF_BASE: ${{ github.event.pull_request.base.sha || github.event.before }}
250258
DIFF_HEAD: ${{ github.event.pull_request.head.sha || github.sha }}
251-
run: go tool task parity:plan
259+
run: task parity:plan
252260
- if: steps.plan.outputs.run == 'true'
253261
uses: ./.github/actions/setup-parity-runtime
254262
# push/PR: scoped, plain binary — a fast gate.
255263
- name: Run parity (scoped, plain)
256264
if: steps.plan.outputs.run == 'true' && (github.event_name == 'push' || github.event_name == 'pull_request')
257265
env:
258266
PARITY_COMMAND: ${{ steps.plan.outputs.commands }}
259-
run: go tool task parity:runtime
267+
run: task parity:runtime
260268
# daily: full matrix, instrumented binary — gates parity AND measures coverage.
261269
- name: Run parity (full, instrumented)
262270
if: steps.plan.outputs.run == 'true' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
263-
run: go tool task coverage:parity-runtime
271+
run: task coverage:parity-runtime
264272
- name: Coverage summary
265273
if: always() && steps.plan.outputs.run == 'true' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
266-
run: go tool task coverage:summary SRC=artifacts/coverage/data/runtime TITLE="parity:runtime shard $PARITY_SHARD_INDEX"
274+
run: task coverage:summary SRC=artifacts/coverage/data/runtime TITLE="parity:runtime shard $PARITY_SHARD_INDEX"
267275
- if: always() && steps.plan.outputs.run == 'true'
268-
run: go tool task reference:commit
276+
run: task reference:commit
269277
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
270278
if: always() && steps.plan.outputs.run == 'true'
271279
with:
@@ -280,7 +288,7 @@ jobs:
280288
path: artifacts/coverage/data/runtime
281289
if-no-files-found: error
282290
- if: always() && steps.plan.outputs.run == 'true'
283-
run: go tool task clean
291+
run: task clean
284292

285293
# Publish parity (features/templates → ephemeral OCI registry). Daily only, its own
286294
# job so it doesn't steal a runtime shard's runner.
@@ -296,18 +304,18 @@ jobs:
296304
with:
297305
submodules: recursive
298306
- uses: ./.github/actions/setup-parity-runtime
299-
- run: go tool task coverage:parity-publish
307+
- run: task coverage:parity-publish
300308
- name: Coverage summary
301309
if: always()
302-
run: go tool task coverage:summary SRC=artifacts/coverage/data/publish TITLE=parity:publish
310+
run: task coverage:summary SRC=artifacts/coverage/data/publish TITLE=parity:publish
303311
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
304312
if: always()
305313
with:
306314
name: covdata-publish
307315
path: artifacts/coverage/data/publish
308316
if-no-files-found: error
309317
- if: always()
310-
run: go tool task clean
318+
run: task clean
311319

312320
# Single gate + cross-lane coverage for ALL events (absorbs the old push/PR
313321
# parity-runtime aggregator, the daily report, and the per-PR coverage-report):
@@ -324,15 +332,16 @@ jobs:
324332
- uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7
325333
with:
326334
go-version-file: go.mod
335+
- uses: spin-stack/go-tools@116dfa6befab594f25ad4553e375061e3fa80f27 # v20261128.01
327336
- name: Download all lane covdata
328337
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
329338
with:
330339
pattern: covdata-*
331340
path: artifacts/coverage/data
332341
- name: Normalize lane dirs
333-
run: go tool task coverage:unpack
342+
run: task coverage:unpack
334343
- name: Merged coverage report
335-
run: go tool task coverage:merge
344+
run: task coverage:merge
336345
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
337346
with:
338347
name: covdata-merged
@@ -344,7 +353,7 @@ jobs:
344353
env:
345354
RUNTIME_RESULT: ${{ needs.parity-runtime.result }}
346355
PUBLISH_RESULT: ${{ needs.parity-publish-full.result }}
347-
run: go tool task parity:gate
356+
run: task parity:gate
348357

349358
cross-compile:
350359
runs-on: ubuntu-latest
@@ -355,5 +364,6 @@ jobs:
355364
- uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7
356365
with:
357366
go-version-file: go.mod
367+
- uses: spin-stack/go-tools@116dfa6befab594f25ad4553e375061e3fa80f27 # v20261128.01
358368

359-
- run: go tool task build:cross
369+
- run: task build:cross

‎.github/workflows/refresh.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
- uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7
3333
with:
3434
go-version-file: go.mod
35+
- uses: spin-stack/go-tools@116dfa6befab594f25ad4553e375061e3fa80f27 # v20261128.01
3536
- name: Propose the pins CI checks at their newest
3637
env:
3738
GITHUB_TOKEN: ${{ github.token }}
@@ -40,4 +41,4 @@ jobs:
4041
GIT_AUTHOR_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
4142
GIT_COMMITTER_NAME: github-actions[bot]
4243
GIT_COMMITTER_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
43-
run: go tool task refresh
44+
run: task refresh

0 commit comments

Comments
 (0)