Skip to content

Commit

Permalink
make vendorlint conditional on changed go.sum
Browse files Browse the repository at this point in the history
  • Loading branch information
abe-winter committed Sep 7, 2023
1 parent ed3c302 commit 82a90b3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/server-32bit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 82a90b3

Please sign in to comment.