silenceper / wechat

WeChat SDK for Go (微信SDK:简单、易用)
https://silenceper.com/wechat/
Apache License 2.0
4.74k stars 1.09k forks source link

feat:企业微信-通讯录管理-互联企业 #688

Closed markwang1992 closed 1 year ago

markwang1992 commented 1 year ago

为什么golangci-lint通过不了了

houseme commented 1 year ago

为什么golangci-lint通过不了了

golangci-lint 有 bug


name: Go

on:
  push:
    branches: [ master,release-*,v2 ]
  pull_request:
    branches: [ master,release-*,v2 ]

jobs:
  golangci:
    strategy:
      matrix:
        go-version: [1.16.x,1.17.x,1.18.x]
    name: golangci-lint
    runs-on: ubuntu-latest
    steps:
      - uses: actions/setup-go@v3
      - uses: actions/checkout@v3
      - name: golangci-lint
        uses: golangci/golangci-lint-action@v3.2.0
        with:
          # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
          version: latest
  build:
    name: Test
    runs-on: ubuntu-latest
    services:
      redis:
        image: redis
        ports:
        - 6379:6379
        options: --entrypoint redis-server
      memcached:
        image: memcached
        ports:
          - 11211:11211

    # strategy set
    strategy:
      matrix:
        go: ["1.16", "1.17", "1.18"]

    steps:
      - uses: actions/checkout@v2
      - name: Set up Go 1.x
        uses: actions/setup-go@v2
        with:
          go-version: ${{ matrix.go }}
        id: go
      - name: Test
        run: go test -v -race ./...

go.yml 中的上面内容替换为下面内容


name: Go

on:
  push:
    branches: [ master,release-*,v2 ]
  pull_request:
    branches: [ master,release-*,v2 ]

jobs:
  golangci:
    strategy:
      matrix:
        go-version: [ 1.16','1.17','1.18','1.19','1.20' ]
    name: golangci-lint
    runs-on: ubuntu-latest
    steps:
      - name: Setup Golang ${{ matrix.go-version }}
        uses: actions/setup-go@v4
        with:
          go-version: ${{ matrix.go-version }}
      - name: Checkout
        uses: actions/checkout@v3
      - name: golangci-lint
        uses: golangci/golangci-lint-action@v3
        with:
          # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
          version: v1.52.2
  build:
    name: Test
    runs-on: ubuntu-latest
    services:
      redis:
        image: redis
        ports:
          - 6379:6379
        options: --entrypoint redis-server
      memcached:
        image: memcached
        ports:
          - 11211:11211

    # strategy set
    strategy:
      matrix:
        go: [ '1.16','1.17','1.18','1.19','1.20' ]

    steps:
      - uses: actions/checkout@v3
      - name: Set up Go 1.x
        uses: actions/setup-go@v4
        with:
          go-version: ${{ matrix.go }}
        id: go
      - name: Test
        run: go test -v -race ./...

一起修改掉吧

silenceper commented 1 year ago

rebase 一下最新的代码

houseme commented 1 year ago

@markwang1992 同步一下主分支代码

markwang1992 commented 1 year ago

All checks have passed

@markwang1992 同步一下主分支代码

已同步