diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ea28440e9..0efa1974b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -51,23 +51,4 @@ jobs: echo "OWNER: $OWNER" echo "REPO: $REPO" git clone -b develop https://github.com/${OWNER}/${REPO}.git; cd ${REPO} - docker compose up -d - - - # - name: deploy # Deployment - # run: | - # ssh work@182.92.xxx.xxx " - # # 【Attention】Log in with the 'work' account, manually create /home/work/imooc-lego directory - # # Then git clone https://username:password@github.com/imooc-lego/biz-editor-server.git -b dev (private repository, use GitHub username and password) - # # Remember to delete origin to avoid exposing GitHub password - # cd /home/work/imooc-lego/biz-editor-server; - # git remote add origin https://openimbot:${{secrets.WFP_PASSWORD}}@github.com/OpenIMSDK/open-im-server.git; - # git checkout dev; - # git pull origin dev; # Download the latest code again - # git remote remove origin; # Remove origin to avoid exposing GitHub password - # # Start docker - # docker-compose build editor-server; # Same as the service name in docker-compose.yml - # docker-compose up -d; - # " - # - name: delete ssh key # Delete ssh key - # run: rm -rf ~/.ssh/id_rsa \ No newline at end of file + docker compose up -d \ No newline at end of file diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 279d4bc35..7280a3d31 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -26,13 +26,13 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: '1.21' cache: false - name: golangci-lint uses: golangci/golangci-lint-action@v3.7.0 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 + version: v1.54 # Optional: working directory, useful for monorepos # working-directory: server diff --git a/.golangci.yml b/.golangci.yml index 2c7ab5348..3d50e109b 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -176,7 +176,7 @@ linters-settings: # put imports beginning with prefix after 3rd-party packages; # only support one prefix # if not set, use goimports.local-prefixes - prefix: github.com/OpenIMSDK/OpenKF + prefix: github.com/OpenIMSDK/Open-IM-Server gocognit: # minimal code complexity to report, 30 by default (but we recommend 10-20) min-complexity: 30 @@ -333,10 +333,8 @@ linters-settings: goimports: # put imports beginning with prefix after 3rd-party packages; # it's a comma-separated list of prefixes - local-prefixes: github.com/OpenIMSDK/OpenKF - golint: - # minimal confidence for issues, default is 0.8 - min-confidence: 0.9 + local-prefixes: github.com/OpenIMSDK/Open-IM-Server + gomnd: settings: mnd: @@ -442,12 +440,7 @@ linters-settings: # packages-with-error-message: # # specify an error message to output when a blacklisted package is used # - github.com/Sirupsen/logrus: "logging is allowed only by logutils.Log" - ifshort: - # Maximum length of variable declaration measured in number of lines, after which linter won't suggest using short syntax. - # Has higher priority than max-decl-chars. - max-decl-lines: 1 - # Maximum length of variable declaration measured in number of characters, after which linter won't suggest using short syntax. - max-decl-chars: 30 + importas: # if set to `true`, force to use alias. @@ -722,7 +715,6 @@ linters: - asciicheck - bodyclose - cyclop - - deadcode # - depguard - dogsled - dupl @@ -750,7 +742,6 @@ linters: - gosec - gosimple - govet - - ifshort - importas - ineffassign - lll @@ -770,19 +761,16 @@ linters: - rowserrcheck - sqlclosecheck - staticcheck - - structcheck - stylecheck - thelper - tparallel - unconvert - unparam - unused - - varcheck - wastedassign - whitespace - bidichk - wastedassign - - golint - execinquery - nosprintfhostport - grouper @@ -813,10 +801,6 @@ issues: # Excluding configuration per-path, per-linter, per-text and per-source exclude-rules: - - linters: - - golint - path: (internal/api/.*)\.go # exclude golint for internal/api/... files - - linters: - revive path: (log/.*)\.go @@ -856,9 +840,7 @@ issues: - path: (pkg/app/.*)\.go linters: - - deadcode - unused - - varcheck - forbidigo # Exclude some staticcheck messages