github.heygears.com/openimsdk/tools@v0.0.49/.github/workflows/golangci-lint.yml (about)

     1  # Copyright © 2023 OpenIM open source community. All rights reserved.
     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  
    16  name: OpenIM golangci-lint
    17  on:
    18    push:
    19      branches: [main]
    20    pull_request:
    21  jobs:
    22      golangci:
    23        name: lint
    24        runs-on: ubuntu-latest
    25        steps:
    26          - uses: actions/checkout@v4
    27          - uses: actions/setup-go@v5
    28            with:
    29              go-version: '1.22'
    30              cache: false
    31          - name: golangci-lint
    32            uses: golangci/golangci-lint-action@v4.0.0
    33            with:
    34              # Require: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
    35              version: v1.54
    36  
    37              # Optional: working directory, useful for monorepos
    38              # working-directory: server
    39  
    40              # Optional: golangci-lint command line arguments.
    41              # 
    42              # Note: by default the `.golangci.yml` file should be at the root of the repository.
    43              # The location of the configuration file can be changed by using `--config=`
    44              # args: --timeout=30m --config=/scripts/.golangci.yml --issues-exit-code=0
    45  
    46              # Optional: show only new issues if it's a pull request. The default value is `false`.
    47              only-new-issues: true
    48  
    49              # Optional:The mode to install golangci-lint. It can be 'binary' or 'goinstall'.
    50              # install-mode: "goinstall"