51 lines
No EOL
986 B
YAML
51 lines
No EOL
986 B
YAML
name: Go test and lint
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
test:
|
|
name: Test with latest golang
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out repo
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up latest golang
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: ^1.18
|
|
|
|
- name: Test
|
|
run: go test -v -race ./...
|
|
|
|
test-old:
|
|
name: Test with 1.15
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out repo
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up Go 1.15
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: 1.15
|
|
|
|
- name: Test
|
|
run: go test -v -race ./...
|
|
|
|
lint:
|
|
name: Lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/setup-go@v3
|
|
with:
|
|
go-version: 1.17
|
|
- uses: actions/checkout@v3
|
|
- name: golangci-lint
|
|
uses: golangci/golangci-lint-action@v3
|
|
with:
|
|
version: v1.46.2 |