2021-05-01 19:53:15 +02:00
|
|
|
name: test
|
|
|
|
on:
|
2021-05-21 17:16:43 +02:00
|
|
|
pull_request:
|
2021-05-21 17:20:45 +02:00
|
|
|
branches:
|
|
|
|
- "*"
|
2021-05-01 19:53:15 +02:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- "*"
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
go_version:
|
|
|
|
- 1.15.x
|
|
|
|
- 1.16.x
|
2021-10-26 19:34:40 +02:00
|
|
|
- 1.17.x
|
2022-04-20 01:50:44 +02:00
|
|
|
- 1.18.X
|
2021-05-01 19:53:15 +02:00
|
|
|
name: Test with ${{ matrix.go_version }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-go@v1
|
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go_version }}
|
|
|
|
- name: Vet and test
|
|
|
|
run: |
|
|
|
|
go version
|
|
|
|
go vet ./...
|
|
|
|
go test ./...
|
2021-12-26 14:03:27 +01:00
|
|
|
golangci:
|
|
|
|
name: Linting
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-go@v1
|
|
|
|
with:
|
2022-04-20 01:50:44 +02:00
|
|
|
go-version: 1.18
|
2021-12-26 14:03:27 +01:00
|
|
|
- name: golangci-lint
|
|
|
|
uses: golangci/golangci-lint-action@v2
|
|
|
|
with:
|
|
|
|
version: latest
|
|
|
|
skip-go-installation: true
|
|
|
|
args: "--config .golangci.yml"
|