2020-11-09 10:30:22 +00:00
|
|
|
name: Go
|
|
|
|
|
2021-04-11 09:17:55 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
2020-11-09 10:30:22 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
name: Test
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-go@v2
|
|
|
|
with:
|
2021-03-29 07:22:52 +00:00
|
|
|
go-version: "~1.16"
|
2020-11-09 10:30:22 +00:00
|
|
|
- run: go test -race ./...
|
2021-03-29 07:26:44 +00:00
|
|
|
build:
|
2021-03-18 10:15:20 +00:00
|
|
|
name: Build
|
2021-03-29 07:26:44 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
2020-11-23 10:45:25 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-go@v2
|
|
|
|
with:
|
2021-03-29 07:22:52 +00:00
|
|
|
go-version: "~1.16"
|
2021-03-18 10:14:19 +00:00
|
|
|
- run: go build
|
2020-11-09 10:30:22 +00:00
|
|
|
lint:
|
|
|
|
name: Lint
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: golangci/golangci-lint-action@v2
|
|
|
|
with:
|
2021-03-18 10:10:16 +00:00
|
|
|
version: latest
|