You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
2.1 KiB
59 lines
2.1 KiB
2 years ago
|
# 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.
|
||
|
|
||
|
|
||
1 year ago
|
name: OpenIM golangci-lint
|
||
2 years ago
|
on:
|
||
|
push:
|
||
|
branches: [main]
|
||
1 year ago
|
pull_request:
|
||
2 years ago
|
jobs:
|
||
|
golangci:
|
||
|
name: lint
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
1 year ago
|
- uses: actions/checkout@v4
|
||
10 months ago
|
- uses: actions/setup-go@v5
|
||
2 years ago
|
with:
|
||
1 year ago
|
go-version: '1.21'
|
||
2 years ago
|
cache: false
|
||
11 months ago
|
- name: OpenIM Scripts Verification(make verify)
|
||
8 months ago
|
run: |
|
||
|
cd scripts
|
||
|
for script in verify-*; do
|
||
|
if [ -x "$script" ]; then
|
||
|
./"$script"
|
||
|
fi
|
||
|
done
|
||
2 years ago
|
- name: golangci-lint
|
||
10 months ago
|
uses: golangci/golangci-lint-action@v4.0.0
|
||
2 years ago
|
with:
|
||
|
# Require: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
|
||
1 year ago
|
version: v1.54
|
||
2 years ago
|
|
||
|
# Optional: working directory, useful for monorepos
|
||
1 year ago
|
# working-directory: server
|
||
2 years ago
|
|
||
|
# 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=`
|
||
1 year ago
|
# args: --timeout=30m --config=/scripts/.golangci.yml --issues-exit-code=0
|
||
2 years ago
|
|
||
|
# Optional: show only new issues if it's a pull request. The default value is `false`.
|
||
1 year ago
|
only-new-issues: true
|
||
2 years ago
|
|
||
|
# Optional:The mode to install golangci-lint. It can be 'binary' or 'goinstall'.
|
||
11 months ago
|
# install-mode: "goinstall"
|