Skip to content

Commit e16e035

Browse files
authored
Enhance workFlow to add git mod tidy (#458)
Signed-off-by: kruthika04 <[email protected]>
1 parent 5a105f0 commit e16e035

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

.github/workflows/test-on-push.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,6 @@ jobs:
5252
version: ${{ env.GOLANGCILINT_VER }}
5353
skip-cache: true
5454
args: --timeout=10m0s
55+
56+
- name: Run go mod tidy check diff
57+
run: make modtidy check-diff

.github/workflows/validate_examples.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ jobs:
4141
run: |
4242
python -m pip install --upgrade pip
4343
pip install mechanical-markdown
44+
- name: Run go mod tidy check diff
45+
run: make modtidy check-diff
4446
- name: Set up Dapr CLI
4547
run: wget -q ${{ env.DAPR_INSTALL_URL }} -O - | /bin/bash -s ${{ env.DAPR_CLI_VER }}
4648
- name: Set up Go ${{ env.GOVER }}

Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,12 @@ clean: ## Cleans go and generated files in ./dapr/proto/
4848
help: ## Display available commands
4949
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk \
5050
'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
51+
52+
.PHONY: check-diff
53+
check-diff:
54+
git diff --exit-code ./go.mod # check no changes
55+
git diff --exit-code ./go.sum # check no changes
56+
57+
.PHONY: modtidy
58+
modtidy:
59+
go mod tidy

0 commit comments

Comments
 (0)