github.com/mailgun/holster/v4@v4.20.0/.github/workflows/lint.yaml (about)

     1  name: Lint
     2  
     3  on:
     4    push:
     5      branches:
     6        - master
     7    pull_request:
     8  
     9  env:
    10    SSH_AUTH_SOCK: /tmp/ssh_agent.sock
    11    GOLANGCI_LINT_VERSION: v1.57.2
    12  
    13  jobs:
    14    lint:
    15      name: lint
    16      strategy:
    17        matrix:
    18          os: [ ubuntu-latest ]
    19      runs-on: ${{ matrix.os }}
    20      steps:
    21        - name: Checkout code
    22          uses: actions/checkout@v4
    23  
    24        - name: Install Go
    25          uses: actions/setup-go@v5
    26          with:
    27            go-version-file: ./go.mod
    28            cache: true # caching and restoring go modules and build outputs
    29  
    30        - name: Check that 'go mod tidy' was called before commit
    31          run: go mod tidy && git diff --exit-code
    32  
    33        - name: golangci-lint
    34          uses: golangci/golangci-lint-action@v4
    35          with:
    36            version: ${{ env.GOLANGCI_LINT_VERSION }}
    37            skip-cache: true # cache/restore is done by actions/setup-go@v3 step
    38            args: -v