1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-11-28 09:08:41 +02:00

fail on vendor directory mismatch

try this

or this

more
This commit is contained in:
Jesse Duffield 2022-08-15 19:45:24 +10:00
parent 6d7a7afbbc
commit a94c703afb

View File

@ -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() }}