From 7abe7591f481922f2edb562bb85dbb80284bf86b Mon Sep 17 00:00:00 2001 From: Paulo Gomes Date: Mon, 20 Dec 2021 17:29:21 +0000 Subject: [PATCH] Add make verify Signed-off-by: Paulo Gomes --- .github/workflows/e2e.yaml | 9 ++------- Makefile | 9 +++++++++ hack/ci/e2e.sh | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 7ebb3e71..bf0806e6 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -37,13 +37,8 @@ jobs: uses: ./.github/actions/run-tests env: GOPATH: /github/home/go - - name: Check if working tree is dirty - run: | - if [[ $(git diff --stat) != '' ]]; then - git --no-pager diff - echo 'run make test and commit changes' - exit 1 - fi + - name: Verify + run: make verify - name: Run E2E tests env: CREATE_CLUSTER: false diff --git a/Makefile b/Makefile index 895342f4..3e34a07b 100644 --- a/Makefile +++ b/Makefile @@ -228,3 +228,12 @@ update-attributions: e2e: ./hack/ci/e2e.sh + +verify: update-attributions fmt vet +ifneq (, $(shell git status --porcelain --untracked-files=no)) + @{ \ + echo "working directory is dirty:"; \ + git --no-pager diff; \ + exit 1; \ + } +endif diff --git a/hack/ci/e2e.sh b/hack/ci/e2e.sh index cd529d10..a7f616bc 100755 --- a/hack/ci/e2e.sh +++ b/hack/ci/e2e.sh @@ -81,7 +81,7 @@ kubectl -n source-system delete -f "${ROOT_DIR}/config/testdata/helmchart-values echo "Setup Minio" kubectl create ns minio -helm repo add minio https://helm.min.io/ +helm repo add minio https://helm.min.io/ --force-update helm upgrade minio minio/minio --wait -i \ --version "${MINIO_HELM_VER}" \ --namespace minio \