diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-08-15 19:45:24 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-08-15 19:55:27 +1000 |
commit | a94c703afb7146ffdc1377291c33f0941ecedcec (patch) | |
tree | 470a10942d40022ce5642b73f4ff22a93ea450f8 /.github | |
parent | 6d7a7afbbc091558e79f4418fbea03689cae30ff (diff) |
fail on vendor directory mismatch
try this
or this
more
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/ci.yml | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b175b02f2..a781b290f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -135,7 +135,7 @@ jobs: - name: Build integration test injector run: | GOOS=linux go build pkg/integration/clients/injector/main.go - check-cheatsheet: + check-codebase: runs-on: ubuntu-latest env: GOFLAGS: -mod=vendor @@ -159,6 +159,10 @@ jobs: - name: Check Cheatsheet run: | go run scripts/cheatsheet/main.go check + - name: Check Vendor Directory + # ensure our vendor directory matches up with our go modules + run: | + go mod vendor && git diff --exit-code || (echo "Unexpected change to vendor directory. Run 'go mod vendor' locally and commit the changes" && exit 1) lint: runs-on: ubuntu-latest env: @@ -183,12 +187,6 @@ jobs: uses: golangci/golangci-lint-action@v3.1.0 with: version: latest - - name: Format code - run: | - if [ $(find . ! -path "./vendor/*" -name "*.go" -exec gofmt -s -d {} \;|wc -l) -gt 0 ]; then - find . ! -path "./vendor/*" -name "*.go" -exec gofmt -s -d {} \; - exit 1 - fi - name: errors run: golangci-lint run if: ${{ failure() }} |