renamed tool cache and added goimports to pipeline

This commit is contained in:
Christian Mouchet
2022-05-17 14:54:37 +02:00
committed by Jean-Philippe Bossuat
parent 82b5dec472
commit cf39d41a87
2 changed files with 4 additions and 2 deletions

View File

@@ -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

View File

@@ -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