mirror of https://github.com/dapr/go-sdk.git
Enhance workFlow to add git mod tidy (#458)
Signed-off-by: kruthika04 <km80974@usc.edu>
This commit is contained in:
parent
5a105f09ac
commit
e16e0350a5
|
@ -52,3 +52,6 @@ jobs:
|
||||||
version: ${{ env.GOLANGCILINT_VER }}
|
version: ${{ env.GOLANGCILINT_VER }}
|
||||||
skip-cache: true
|
skip-cache: true
|
||||||
args: --timeout=10m0s
|
args: --timeout=10m0s
|
||||||
|
|
||||||
|
- name: Run go mod tidy check diff
|
||||||
|
run: make modtidy check-diff
|
||||||
|
|
|
@ -41,6 +41,8 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install mechanical-markdown
|
pip install mechanical-markdown
|
||||||
|
- name: Run go mod tidy check diff
|
||||||
|
run: make modtidy check-diff
|
||||||
- name: Set up Dapr CLI
|
- name: Set up Dapr CLI
|
||||||
run: wget -q ${{ env.DAPR_INSTALL_URL }} -O - | /bin/bash -s ${{ env.DAPR_CLI_VER }}
|
run: wget -q ${{ env.DAPR_INSTALL_URL }} -O - | /bin/bash -s ${{ env.DAPR_CLI_VER }}
|
||||||
- name: Set up Go ${{ env.GOVER }}
|
- name: Set up Go ${{ env.GOVER }}
|
||||||
|
|
9
Makefile
9
Makefile
|
@ -48,3 +48,12 @@ clean: ## Cleans go and generated files in ./dapr/proto/
|
||||||
help: ## Display available commands
|
help: ## Display available commands
|
||||||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk \
|
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk \
|
||||||
'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
||||||
|
|
||||||
|
.PHONY: check-diff
|
||||||
|
check-diff:
|
||||||
|
git diff --exit-code ./go.mod # check no changes
|
||||||
|
git diff --exit-code ./go.sum # check no changes
|
||||||
|
|
||||||
|
.PHONY: modtidy
|
||||||
|
modtidy:
|
||||||
|
go mod tidy
|
||||||
|
|
Loading…
Reference in New Issue