github.com/ydb-platform/ydb-go-sdk/v3@v3.57.0/.github/workflows/lint.yml (about)

     1  name: lint
     2  on:
     3    push:
     4      branches:
     5        - master
     6        - release-*
     7    pull_request:
     8    workflow_dispatch:
     9  env:
    10    GOLANGCI_LINT_VERSION: v1.55.2
    11  jobs:
    12    golangci:
    13      name: golangci-lint
    14      concurrency:
    15        group: lint-golangci-${{ github.ref }}
    16        cancel-in-progress: true
    17      runs-on: ubuntu-latest
    18      steps:
    19        - uses: actions/checkout@v3
    20        - name: golangci-lint
    21          uses: golangci/golangci-lint-action@v3
    22          with:
    23            version: ${{ env.GOLANGCI_LINT_VERSION }}
    24            args: --timeout=5m
    25    golangci-examples:
    26      name: golangci-lint-examples
    27      concurrency:
    28        group: lint-golangci-examples-${{ github.ref }}
    29        cancel-in-progress: true
    30      runs-on: ubuntu-latest
    31      steps:
    32        - uses: actions/checkout@v3
    33        - name: generate examples golangci-lint config
    34          run: sed 's/github.com\/ydb-platform\/ydb-go-sdk\/v3/examples/g' .golangci.yml > examples/.golangci.yml
    35        - name: golangci-lint
    36          uses: golangci/golangci-lint-action@v3
    37          with:
    38            version: ${{ env.GOLANGCI_LINT_VERSION }}
    39            args: --timeout=5m
    40            working-directory: examples
    41    golangci-slo:
    42      name: golangci-lint-slo
    43      concurrency:
    44        group: lint-golangci-slo-${{ github.ref }}
    45        cancel-in-progress: true
    46      runs-on: ubuntu-latest
    47      steps:
    48        - uses: actions/checkout@v3
    49        - name: generate slo golangci-lint config
    50          run: sed 's/github.com\/ydb-platform\/ydb-go-sdk\/v3/slo/g' .golangci.yml > tests/slo/.golangci.yml
    51        - name: golangci-lint
    52          uses: golangci/golangci-lint-action@v3
    53          with:
    54            version: ${{ env.GOLANGCI_LINT_VERSION }}
    55            args: --timeout=5m
    56            working-directory: tests/slo
    57    autoformatter:
    58      name: autoformat check
    59      concurrency:
    60        group: lint-autoformat-${{ github.ref }}
    61        cancel-in-progress: true
    62      runs-on: ubuntu-latest
    63      steps:
    64        - uses: actions/checkout@v3
    65        - name: Install Go
    66          uses: actions/setup-go@v3
    67          with:
    68            go-version: "1.21"
    69        - name: Install utilities
    70          run: |
    71            go install mvdan.cc/gofumpt@v0.3.1
    72            go install github.com/daixiang0/gci@v0.12.1
    73        - name: format all files with auto-formatter
    74          run: bash ./.github/scripts/format-all-go-code.sh "$PWD"
    75        - name: Check repository diff
    76          run: bash ./.github/scripts/check-work-copy-equals-to-committed.sh "auto-format broken"