diff --git a/.github/workflows/components-contrib.yml b/.github/workflows/components-contrib.yml index b4265c4b6..453feadf0 100644 --- a/.github/workflows/components-contrib.yml +++ b/.github/workflows/components-contrib.yml @@ -54,9 +54,9 @@ jobs: uses: golangci/golangci-lint-action@v2.2.1 with: version: ${{ env.GOLANGCI_LINT_VER }} - - name: Run make go.mod check-diff - if: matrix.target_arch != 'arm' - run: make go.mod check-diff + - name: Run go mod tidy check diff + if: matrix.target_arch == 'amd64' && matrix.target_os == 'linux' + run: make modtidy check-diff - name: Run make test env: COVERAGE_OPTS: "-coverprofile=coverage.txt -covermode=atomic" diff --git a/Makefile b/Makefile index c9df1a202..c6c57309b 100644 --- a/Makefile +++ b/Makefile @@ -64,10 +64,10 @@ lint: $(GOLANGCI_LINT) run --timeout=20m ################################################################################ -# Target: go.mod # +# Target: modtidy # ################################################################################ -.PHONY: go.mod -go.mod: +.PHONY: modtidy +modtidy: go mod tidy ################################################################################ @@ -76,6 +76,7 @@ go.mod: .PHONY: check-diff check-diff: git diff --exit-code ./go.mod # check no changes + git diff --exit-code ./go.sum # check no changes ################################################################################ # Target: conf-tests # diff --git a/docs/developing-component.md b/docs/developing-component.md index 92279fc1a..eecc128cd 100644 --- a/docs/developing-component.md +++ b/docs/developing-component.md @@ -62,6 +62,7 @@ go mod edit -replace github.com/dapr/components-contrib=../components-contrib 4. Register your component in dapr [main.go](https://github.com/dapr/dapr/blob/d17e9243b308e830649b0bf3af5f6e84fd543baf/cmd/daprd/main.go#L153-L226)(e.g. binding) 5. Build debuggable dapr binary ```bash +go mod tidy make DEBUG=1 build ``` 6. Replace the installed daprd with the test binary (then dapr cli will use the test binary)