mirror of
				https://github.com/openimsdk/open-im-server.git
				synced 2025-11-04 03:13:15 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			52 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			52 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
# Copyright © 2023 OpenIM open source community. All rights reserved.
 | 
						|
#
 | 
						|
# Licensed under the Apache License, Version 2.0 (the "License");
 | 
						|
# you may not use this file except in compliance with the License.
 | 
						|
# You may obtain a copy of the License at
 | 
						|
#
 | 
						|
#     http://www.apache.org/licenses/LICENSE-2.0
 | 
						|
#
 | 
						|
# Unless required by applicable law or agreed to in writing, software
 | 
						|
# distributed under the License is distributed on an "AS IS" BASIS,
 | 
						|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
						|
# See the License for the specific language governing permissions and
 | 
						|
# limitations under the License.
 | 
						|
 | 
						|
 | 
						|
name: OpenIM golangci-lint
 | 
						|
on:
 | 
						|
  push:
 | 
						|
    branches: [main]
 | 
						|
  pull_request:
 | 
						|
    branches: [main]
 | 
						|
jobs:
 | 
						|
    golangci:
 | 
						|
      name: lint
 | 
						|
      runs-on: ubuntu-latest
 | 
						|
      steps:
 | 
						|
        - uses: actions/checkout@v3
 | 
						|
        - uses: actions/setup-go@v4
 | 
						|
          with:
 | 
						|
            go-version: '1.20'
 | 
						|
            cache: false
 | 
						|
        - name: golangci-lint
 | 
						|
          uses: golangci/golangci-lint-action@v3
 | 
						|
          with:
 | 
						|
            # Require: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
 | 
						|
            version: v1.53
 | 
						|
 | 
						|
            # Optional: working directory, useful for monorepos
 | 
						|
            working-directory: server
 | 
						|
 | 
						|
            # Optional: golangci-lint command line arguments.
 | 
						|
            # 
 | 
						|
            # Note: by default the `.golangci.yml` file should be at the root of the repository.
 | 
						|
            # The location of the configuration file can be changed by using `--config=`
 | 
						|
            args: --timeout=30m --config=/scripts/golangci.yml # --issues-exit-code=0
 | 
						|
 | 
						|
            # Optional: show only new issues if it's a pull request. The default value is `false`.
 | 
						|
            # only-new-issues: true
 | 
						|
 | 
						|
            # Optional:The mode to install golangci-lint. It can be 'binary' or 'goinstall'.
 | 
						|
            install-mode: "goinstall"
 |