Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: go mod tidy verification #113

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
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ jobs:

- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
go-version-file: go.mod
cache: false

- name: Install Go dependencies
run: go mod download
Expand Down Expand Up @@ -77,7 +78,8 @@ jobs:

- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
go-version-file: go.mod
cache: false

- name: Checkout Non Admin Controller (NAC)
uses: actions/checkout@v4
Expand Down
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,14 @@ check-manifests: manifests ## Check if 'make manifests' was run.
ec: editorconfig ## Run file formatter checks against all project's files.
$(EC)

.PHONY: check-go-dependencies
check-go-dependencies: ## Check if 'go mod tidy' was run.
.PHONY: go-dependencies
go-dependencies: ## Update go dependencies.
go mod tidy
go mod verify
test -z "$(shell git status --short)" || (echo "run 'go mod tidy' to update go dependencies" && exit 1)

.PHONY: check-go-dependencies
check-go-dependencies: go-dependencies ## Check if 'make go-dependencies' was run.
test -z "$(shell git status --short)" || (echo "run 'make go-dependencies' to update go dependencies" && exit 1)

.PHONY: check-images
check-images: MANAGER_IMAGE:=$(shell grep -I 'newName: ' ./config/manager/kustomization.yaml | awk -F': ' '{print $$2}')
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ toolchain go1.22.6

require (
github.com/go-logr/logr v1.4.1
github.com/google/uuid v1.6.0
github.com/onsi/ginkgo/v2 v2.19.0
github.com/onsi/gomega v1.33.1
github.com/stretchr/testify v1.9.0
Expand Down Expand Up @@ -36,7 +37,6 @@ require (
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
Expand Down