diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0e33ae4a..f74a5f1f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,9 +17,9 @@ jobs: - uses: actions/cache@v3 with: path: ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + key: ${{ runner.os }}-go-tools-${{ hashFiles('**/go.sum') }} restore-keys: | - ${{ runner.os }}-go- + ${{ runner.os }}-go-tools - name: Setup tools run: make get_tools diff --git a/Makefile b/Makefile index 6b146546..e0a7a781 100644 --- a/Makefile +++ b/Makefile @@ -28,6 +28,7 @@ static_check: out=`go fmt ./...`; echo "$$out"; [ -z "$$out" ] go vet ./... out=`golint ./...`; echo "$$out"; [ -z "$$out" ] + out=`goimports -l .`; echo "$$out"; [ -z "$$out" ] staticcheck -go 1.17 ./... go mod tidy out=`git status --porcelain`; echo "$$out"; [ -z "$$out" ] @@ -41,4 +42,5 @@ ci_test: static_checks test_gotest test_examples .PHONY: get_tools get_tools: go install golang.org/x/lint/golint@latest + go install golang.org/x/tools/cmd/goimports@latest go install honnef.co/go/tools/cmd/staticcheck@2022.1.1 \ No newline at end of file