Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/actions/setup-parity-runtime/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ runs:
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7
with:
go-version-file: go.mod
- uses: spin-stack/go-tools@116dfa6befab594f25ad4553e375061e3fa80f27 # v20261128.01
# pnpm installs the reference, through the firewall (task reference).
- uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
with:
Expand All @@ -21,7 +22,7 @@ runs:
# Free disk, enable the containerd image store (build-cache export) and turn
# bake's filesystem entitlement off. Reuses the Taskfile so the runner prep
# is identical to release.yml.
- run: go tool task ci:prepare-runner
- run: task ci:prepare-runner
shell: bash
- run: go tool task reference
- run: task reference
shell: bash
2 changes: 1 addition & 1 deletion .github/deadcode-allow.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Functions no binary reaches that are correct for ever, one `<symbol> # why` a line (go tool deadgate -allow).
# Functions no binary reaches that are correct for ever, one `<symbol> # why` a line (deadgate -allow).
# An entry that matches nothing fails, so the list only shrinks.
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
2 changes: 1 addition & 1 deletion .github/deadcode-pending.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Functions no binary reaches whose deletion somebody owes, one `<symbol> # why` a line (go tool deadgate -pending).
# Functions no binary reaches whose deletion somebody owes, one `<symbol> # why` a line (deadgate -pending).
# Printed on every green run; an entry that matches nothing fails.
2 changes: 1 addition & 1 deletion .github/testquality-allow.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Tests testquality reports that are kept on purpose, one <package>:<TestName> a line with why
# (go tool testquality -allow). An entry that matches nothing fails, so the list only shrinks.
# (testquality -allow). An entry that matches nothing fails, so the list only shrinks.
github.com/devcontainers/cli/internal/exec:TestHelperProcess # the child process OSRunner tests exec; it asserts nothing by design, the parent tests do
76 changes: 43 additions & 33 deletions .github/workflows/go-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,13 @@ jobs:
- uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7
with:
go-version-file: go.mod
# Task and every go-tools command, from go-tools' latest release, before any job's first
# `task`: no go.mod pins them, and an older pin of this action installs the same release.
- uses: spin-stack/go-tools@116dfa6befab594f25ad4553e375061e3fa80f27 # v20261128.01
- name: What this change broke, and whether a test noticed
env:
BASE: origin/${{ github.base_ref }}
run: go tool task mutate
run: task mutate

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

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

- run: go tool task lint
- run: go tool task spec:compliance
- run: go tool task vuln
- run: go tool task test:race
- run: go tool task coverage
- run: task lint
- run: task spec:compliance
- run: task vuln
- run: task test:race
- run: task coverage
- name: Coverage summary
if: always()
run: go tool task coverage:summary SRC=coverage.out TITLE="unit (hermetic)"
- run: go tool task test:integration
- run: go tool task build
- run: go tool task build:smoke
run: task coverage:summary SRC=coverage.out TITLE="unit (hermetic)"
- run: task test:integration
- run: task build
- run: task build:smoke

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

- run: go tool task coverage:e2e
- run: task coverage:e2e
- name: Coverage summary
if: always()
run: go tool task coverage:summary SRC=artifacts/coverage/data/e2e TITLE=e2e
run: task coverage:summary SRC=artifacts/coverage/data/e2e TITLE=e2e
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
if: always()
with:
name: covdata-e2e
path: artifacts/coverage/data/e2e
if-no-files-found: error
- if: always()
run: go tool task clean
run: task clean

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

- run: go tool task reference
- run: go tool task parity:contract
- run: go tool task parity:network
- run: task reference
- run: task parity:contract
- run: task parity:network
# Coverage is measured separately with an instrumented Go binary. Keep the
# functional parity run above release-like, and avoid conflating subprocess
# coverage with the hermetic unit profile.
- run: go tool task coverage:parity-contract
- run: task coverage:parity-contract
- name: Coverage summary
if: always()
run: go tool task coverage:summary SRC=artifacts/coverage/data/contract TITLE=parity:contract
run: task coverage:summary SRC=artifacts/coverage/data/contract TITLE=parity:contract
- if: always()
run: go tool task reference:commit
run: task reference:commit
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
if: always()
with:
Expand Down Expand Up @@ -191,8 +197,9 @@ jobs:
- uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7
with:
go-version-file: go.mod
- uses: spin-stack/go-tools@116dfa6befab594f25ad4553e375061e3fa80f27 # v20261128.01
- id: check
run: go tool task ci:daily-changes
run: task ci:daily-changes

# Single sharded runtime parity matrix, parameterized by event:
# push/PR — SCOPED to the commands the diff can affect (devtool parity-affected),
Expand Down Expand Up @@ -242,30 +249,31 @@ jobs:
- uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7
with:
go-version-file: go.mod
- uses: spin-stack/go-tools@116dfa6befab594f25ad4553e375061e3fa80f27 # v20261128.01
- name: Plan this run
id: plan
# A pull request's diff is its base..head; a push's, what it moved the branch from..to.
env:
DIFF_BASE: ${{ github.event.pull_request.base.sha || github.event.before }}
DIFF_HEAD: ${{ github.event.pull_request.head.sha || github.sha }}
run: go tool task parity:plan
run: task parity:plan
- if: steps.plan.outputs.run == 'true'
uses: ./.github/actions/setup-parity-runtime
# push/PR: scoped, plain binary — a fast gate.
- name: Run parity (scoped, plain)
if: steps.plan.outputs.run == 'true' && (github.event_name == 'push' || github.event_name == 'pull_request')
env:
PARITY_COMMAND: ${{ steps.plan.outputs.commands }}
run: go tool task parity:runtime
run: task parity:runtime
# daily: full matrix, instrumented binary — gates parity AND measures coverage.
- name: Run parity (full, instrumented)
if: steps.plan.outputs.run == 'true' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
run: go tool task coverage:parity-runtime
run: task coverage:parity-runtime
- name: Coverage summary
if: always() && steps.plan.outputs.run == 'true' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
run: go tool task coverage:summary SRC=artifacts/coverage/data/runtime TITLE="parity:runtime shard $PARITY_SHARD_INDEX"
run: task coverage:summary SRC=artifacts/coverage/data/runtime TITLE="parity:runtime shard $PARITY_SHARD_INDEX"
- if: always() && steps.plan.outputs.run == 'true'
run: go tool task reference:commit
run: task reference:commit
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
if: always() && steps.plan.outputs.run == 'true'
with:
Expand All @@ -280,7 +288,7 @@ jobs:
path: artifacts/coverage/data/runtime
if-no-files-found: error
- if: always() && steps.plan.outputs.run == 'true'
run: go tool task clean
run: task clean

# Publish parity (features/templates → ephemeral OCI registry). Daily only, its own
# job so it doesn't steal a runtime shard's runner.
Expand All @@ -296,18 +304,18 @@ jobs:
with:
submodules: recursive
- uses: ./.github/actions/setup-parity-runtime
- run: go tool task coverage:parity-publish
- run: task coverage:parity-publish
- name: Coverage summary
if: always()
run: go tool task coverage:summary SRC=artifacts/coverage/data/publish TITLE=parity:publish
run: task coverage:summary SRC=artifacts/coverage/data/publish TITLE=parity:publish
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
if: always()
with:
name: covdata-publish
path: artifacts/coverage/data/publish
if-no-files-found: error
- if: always()
run: go tool task clean
run: task clean

# Single gate + cross-lane coverage for ALL events (absorbs the old push/PR
# parity-runtime aggregator, the daily report, and the per-PR coverage-report):
Expand All @@ -324,15 +332,16 @@ jobs:
- uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7
with:
go-version-file: go.mod
- uses: spin-stack/go-tools@116dfa6befab594f25ad4553e375061e3fa80f27 # v20261128.01
- name: Download all lane covdata
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
with:
pattern: covdata-*
path: artifacts/coverage/data
- name: Normalize lane dirs
run: go tool task coverage:unpack
run: task coverage:unpack
- name: Merged coverage report
run: go tool task coverage:merge
run: task coverage:merge
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: covdata-merged
Expand All @@ -344,7 +353,7 @@ jobs:
env:
RUNTIME_RESULT: ${{ needs.parity-runtime.result }}
PUBLISH_RESULT: ${{ needs.parity-publish-full.result }}
run: go tool task parity:gate
run: task parity:gate

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

- run: go tool task build:cross
- run: task build:cross
3 changes: 2 additions & 1 deletion .github/workflows/refresh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
- uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7
with:
go-version-file: go.mod
- uses: spin-stack/go-tools@116dfa6befab594f25ad4553e375061e3fa80f27 # v20261128.01
- name: Propose the pins CI checks at their newest
env:
GITHUB_TOKEN: ${{ github.token }}
Expand All @@ -40,4 +41,4 @@ jobs:
GIT_AUTHOR_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
GIT_COMMITTER_NAME: github-actions[bot]
GIT_COMMITTER_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
run: go tool task refresh
run: task refresh
Loading