Enhance workFlow to add git mod tidy (#458)

Signed-off-by: kruthika04 <km80974@usc.edu>
This commit is contained in:
kruthika04 2023-09-22 13:33:24 -07:00 committed by GitHub
parent 5a105f09ac
commit e16e0350a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 0 deletions

View File

@ -52,3 +52,6 @@ jobs:
version: ${{ env.GOLANGCILINT_VER }}
skip-cache: true
args: --timeout=10m0s
- name: Run go mod tidy check diff
run: make modtidy check-diff

View File

@ -41,6 +41,8 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install mechanical-markdown
- name: Run go mod tidy check diff
run: make modtidy check-diff
- name: Set up Dapr CLI
run: wget -q ${{ env.DAPR_INSTALL_URL }} -O - | /bin/bash -s ${{ env.DAPR_CLI_VER }}
- name: Set up Go ${{ env.GOVER }}

View File

@ -48,3 +48,12 @@ clean: ## Cleans go and generated files in ./dapr/proto/
help: ## Display available commands
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk \
'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