github.com/lbryio/lbcd@v0.22.119/.github/workflows/golangci-lint.yml (about) 1 name: golangci-lint 2 3 env: 4 # go needs absolute directories, using the $HOME variable doesn't work here. 5 GOCACHE: /home/runner/work/go/pkg/build 6 GOPATH: /home/runner/work/go 7 GO_VERSION: '^1.19' 8 9 on: 10 push: 11 tags: 12 - v* 13 branches: 14 - "*" 15 pull_request: 16 branches: 17 - "*" 18 19 jobs: 20 golangci: 21 name: lint 22 runs-on: ubuntu-latest 23 steps: 24 - name: setup go ${{ env.GO_VERSION }} 25 uses: actions/setup-go@v2 26 with: 27 go-version: '${{ env.GO_VERSION }}' 28 29 - name: checkout source 30 uses: actions/checkout@v2 31 32 - name: compile code 33 run: go install -v ./... 34 35 - name: golangci-lint 36 uses: golangci/golangci-lint-action@v2 37 with: 38 # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version 39 version: latest 40 41 # Optional: working directory, useful for monorepos 42 # working-directory: somedir 43 44 # Optional: golangci-lint command line arguments. 45 # args: --issues-exit-code=0 46 47 # Optional: show only new issues if it's a pull request. The default value is `false`. 48 # only-new-issues: true 49 50 # Optional: if set to true then the action will use pre-installed Go. 51 skip-go-installation: true 52 53 # Optional: if set to true then the action don't cache or restore ~/go/pkg. 54 # skip-pkg-cache: true 55 56 # Optional: if set to true then the action don't cache or restore ~/.cache/go-build. 57 # skip-build-cache: true