github.com/ecodeclub/eorm@v0.0.2-0.20231001112437-dae71da914d0/.github/workflows/golangci-lint.yml (about)

     1  # Copyright 2021 ecodeclub
     2  #
     3  # Licensed under the Apache License, Version 2.0 (the "License");
     4  # you may not use this file except in compliance with the License.
     5  # You may obtain a copy of the License at
     6  #
     7  # http://www.apache.org/licenses/LICENSE-2.0
     8  #
     9  # Unless required by applicable law or agreed to in writing, software
    10  # distributed under the License is distributed on an "AS IS" BASIS,
    11  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  # See the License for the specific language governing permissions and
    13  # limitations under the License.
    14  
    15  name: golangci-lint
    16  on:
    17    push:
    18      tags:
    19        - v*
    20      branches:
    21        - master
    22        - main
    23        - dev
    24    pull_request:
    25  permissions:
    26    contents: read
    27    # Optional: allow read access to pull request. Use with `only-new-issues` option.
    28    # pull-requests: read
    29  jobs:
    30    golangci:
    31      name: lint
    32      runs-on: ubuntu-latest
    33      steps:
    34        - uses: actions/setup-go@v3
    35          with:
    36            go-version: '1.20'
    37        - uses: actions/checkout@v3
    38        - name: golangci-lint
    39          uses: golangci/golangci-lint-action@v3
    40          with:
    41            # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
    42            version: latest
    43  
    44            # Optional: working directory, useful for monorepos
    45            # working-directory: somedir
    46  
    47            # Optional: golangci-lint command line arguments.
    48            args: --timeout=10m # --issues-exit-code=0
    49  
    50            # Optional: show only new issues if it's a pull request. The default value is `false`.
    51            only-new-issues: true
    52  
    53            # Optional: if set to true then the all caching functionality will be complete disabled,
    54            #           takes precedence over all other caching options.
    55            # skip-cache: true
    56  
    57            # Optional: if set to true then the action don't cache or restore ~/go/pkg.
    58            # skip-pkg-cache: true
    59  
    60            # Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
    61            # skip-build-cache: true