mirror of
https://github.com/silenceper/wechat.git
synced 2026-02-04 21:02:25 +08:00
* feat: improve action config and code comment * feat: improve comment and upgrade golang version 1.16 * feat: improve import
52 lines
1.1 KiB
YAML
52 lines
1.1 KiB
YAML
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 ./...
|