Skip to content

Update golangci/golangci-lint-action action to v5 #10

Update golangci/golangci-lint-action action to v5

Update golangci/golangci-lint-action action to v5 #10

Workflow file for this run

name: Build
on:
push:
branches:
- main
tags:
- 'v[0-9]+\.[0-9]+\.[0-9]+' # Push events to matching v*, i.e. v20.15.10
pull_request:
branches:
- main
jobs:
test:
strategy:
matrix:
go-version: [ 1.20.x ]
platform: [ ubuntu-latest ]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- run: go get ./...
- run: go build ./...
- run: go vet ./...
- run: go test ./...
- name: Go lint
uses: golangci/golangci-lint-action@v5
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: latest
args: --timeout=3m --print-issued-lines=true
# Optional: working directory, useful for monorepos
# working-directory: somedir
# Optional: golangci-lint command line arguments.
# args: --issues-exit-code=0
# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true
# Optional: if set to true then the all caching functionality will be complete disabled,
# takes precedence over all other caching options.
# skip-cache: true
# Optional: if set to true then the action don't cache or restore ~/go/pkg.
skip-pkg-cache: true
# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
# skip-build-cache: true