diff --git a/.github/workflows/server-32bit.yml b/.github/workflows/server-32bit.yml index 2f3130e23c9..f851a378e19 100644 --- a/.github/workflows/server-32bit.yml +++ b/.github/workflows/server-32bit.yml @@ -38,6 +38,14 @@ jobs: # note: we're linting on 32-bit because atomicalign analyzer only works on 32-bit architecture - name: lint run: docker run --rm -v $PWD/:/rdk ghcr.io/viamrobotics/viam-server:armv7 make lint-32bit + - id: changed-files + uses: tj-actions/changed-files@v39 + with: + # note: this doesn't provide perfect coverage, but it's a compromise between running all the time + never running + since_last_remote_commit: true + - name: vendorlint + if: contains(steps.changed-files.outputs.modified_files, 'go.sum') + run: docker run --rm -v $PWD/:/rdk ghcr.io/viamrobotics/viam-server:armv7 make vendorlint test: needs: [docker] runs-on: buildjet-4vcpu-ubuntu-2204-arm diff --git a/Makefile b/Makefile index eb99eb094f6..9adee1a1e3b 100644 --- a/Makefile +++ b/Makefile @@ -60,6 +60,8 @@ lint-go: tool-install lint-32bit: tool-install $(TOOL_BIN)/golangci-lint run -v --build-tags no_tflite,no_pigpio --tests=false --disable-all --enable staticcheck --timeout 30m + +vendorlint: tool-install go mod vendor # parallelism is 1 for now because golangci-lint detects parallel runs and complains etc/vendorlint.py all --linter $(abspath $(TOOL_BIN)/golangci-lint) --parallel 1 --out vendorlint.json