Skip to content

Commit

Permalink
Add go mod tidy to test target
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Pavlov <[email protected]>
  • Loading branch information
Kshatrix committed Jun 21, 2024
1 parent f2d85ee commit 8fb9a16
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Check go mod
run: go mod tidy && git diff --exit-code
- name: Lint
uses: golangci/golangci-lint-action@v6
with:
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,12 @@ fmt: ## Run go fmt against code.
vet: ## Run go vet against code.
go vet ./...

.PHONY: tidy
tidy:
go mod tidy

.PHONY: test
test: generate-all fmt vet envtest external-crd ## Run tests.
test: generate-all fmt vet envtest external-crd tidy ## Run tests.
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test $$(go list ./... | grep -v /e2e) -coverprofile cover.out

# Utilize Kind or modify the e2e tests to load the image locally, enabling compatibility with other vendors.
Expand Down

0 comments on commit 8fb9a16

Please sign in to comment.