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
17 changes: 17 additions & 0 deletions .github/workflows/identity-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,23 @@ jobs:
go-version-file: pkgs/identity/go.mod
cache-dependency-path: pkgs/identity/go.sum

- name: Verify go.mod and go.sum are tidy
working-directory: pkgs/identity
# Same gap as pkgs/map (#349): build/vet pass on an untidy
# module, so drift would be silent. Tidy is build-tag agnostic,
# so this one step covers both matrix tag variants.
# Pattern copied from go-modules-build.yml: these modules pin
# Go 1.21/1.22, whose `go mod tidy` has no -diff flag (added in
# Go 1.24; mcpx.yml can use it only because mcpx pins Go 1.27),
# so run tidy and fail if it changed anything.
run: |
go mod tidy
if [[ -n "$(git status --short -- go.mod go.sum)" ]]; then
echo "go mod tidy changed go.mod or go.sum; commit the tidy changes."
git diff -- go.mod go.sum
exit 1
fi

- name: Build
working-directory: pkgs/identity
run: go build -tags ${{ matrix.tags }} ./...
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/map-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,24 @@ jobs:
go-version-file: pkgs/map/go.mod
cache-dependency-path: pkgs/map/go.sum

- name: Verify go.mod and go.sum are tidy
working-directory: pkgs/map
# Every sibling module already has this guard (go-modules-build
# for #347, mcpx.yml for nix#436, mod-tidy.yml for graph); map and
# identity were the last two without one, and build/vet pass on
# an untidy module, so drift here would be silent (#349).
# Pattern copied from go-modules-build.yml: these modules pin
# Go 1.21/1.22, whose `go mod tidy` has no -diff flag (added in
# Go 1.24; mcpx.yml can use it only because mcpx pins Go 1.27),
# so run tidy and fail if it changed anything.
run: |
go mod tidy
if [[ -n "$(git status --short -- go.mod go.sum)" ]]; then
echo "go mod tidy changed go.mod or go.sum; commit the tidy changes."
git diff -- go.mod go.sum
exit 1
fi

- name: Build
working-directory: pkgs/map
run: go build ./...
Expand Down
Loading