diff --git a/.github/workflows/go-test.yaml b/.github/workflows/go-test.yaml index e0c6975ee3a8..1cd1d1677c1b 100644 --- a/.github/workflows/go-test.yaml +++ b/.github/workflows/go-test.yaml @@ -9,6 +9,19 @@ permissions: contents: read jobs: + uncommitted-code-check: + name: uncommitted-code-check + runs-on: ubuntu-latest + steps: + - name: Check generated deploy code + run: make generate-deploy + + - name: Check for uncommitted changes for deploy directory + run: make check-deploy-committed + + - name: Show the uncommitted "git diff" + if: ${{ failure() }} + run: git diff ; false e2e-build-test: name: e2e-build-test runs-on: ubuntu-latest diff --git a/Makefile b/Makefile index 7a4067fbf2f4..8a8787f7e74e 100644 --- a/Makefile +++ b/Makefile @@ -184,6 +184,10 @@ generate-deploy: go mod vendor $(MAKE) -C deploy +.PHONY: check-deploy-committed +check-deploy-committed: ## Fail in case there are uncommitted changes for deploy directory + test -z "$(shell git status --short)" || (echo "files were modified: " ; git status --short ; false) + # # e2e testing by compiling e2e.test in case it does not exist and running the # executable. The e2e.test executable is not checked as a dependency in the