name: Go Static Check on: push: branches: - '*' tags-ignore: - '*' pull_request: jobs: build: name: Build runs-on: ubuntu-latest steps: - name: Check out code into the Go module directory uses: actions/checkout@v2 with: fetch-depth: 0 - name: Setup Go uses: actions/setup-go@v2 with: go-version: 1.17.x - name: Cache go module uses: actions/cache@v2 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- - name: Get dependencies, run test and static check run: | go test ./... go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest golangci-lint run --disable-all -E govet -E gofumpt -E megacheck ./...