diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 92e2b479c..f4707b2ba 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -27,10 +27,8 @@ jobs: with: python-version: '3.10' - - name: Go Mod hygiene - run: | - go clean -modcache - go mod tidy + - name: Verify Go modules + run: make verify - name: Build run: go build . diff --git a/.github/workflows/performance-test.yaml b/.github/workflows/performance-test.yaml index 6baecfaff..92f5714bf 100644 --- a/.github/workflows/performance-test.yaml +++ b/.github/workflows/performance-test.yaml @@ -22,10 +22,8 @@ jobs: - name: Set up Go uses: projectdiscovery/actions/setup/go@v1 - - name: Go Mod hygine - run: | - go clean -modcache - go mod tidy + - name: Verify Go modules + run: make verify # Max GH exection time 6H => timeout after that - name: Running performance with big list diff --git a/Makefile b/Makefile index e916b980a..a3f60a64b 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ ifneq ($(shell go env GOOS),darwin) LDFLAGS := -extldflags "-static" endif -.PHONY: all build build-stats scan-charts docs test integration functional tidy devtools jsupdate ts fuzzplayground memogen dsl-docs +.PHONY: all build build-stats scan-charts docs test integration functional tidy verify devtools jsupdate ts fuzzplayground memogen dsl-docs all: build build: @@ -39,6 +39,8 @@ functional: cd cmd/functional-test; bash run.sh tidy: $(GOMOD) tidy +verify: tidy + $(GOMOD) verify devtools: $(GOBUILD) $(GOFLAGS) -ldflags '$(LDFLAGS)' -o "bindgen" pkg/js/devtools/bindgen/cmd/bindgen/main.go $(GOBUILD) $(GOFLAGS) -ldflags '$(LDFLAGS)' -o "tsgen" pkg/js/devtools/tsgen/cmd/tsgen/main.go