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:
|
2024-10-27 19:10:26 +01:00
|
|
|
- '1.21'
|
|
|
|
- '1.22'
|
|
|
|
- '1.23'
|
2023-03-01 13:51:24 +01:00
|
|
|
- tip
|
2021-05-01 19:53:15 +02:00
|
|
|
name: Test with ${{ matrix.go_version }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2023-03-01 13:51:24 +01:00
|
|
|
- name: Install Go ${{ matrix.go_version }}
|
|
|
|
if: ${{ matrix.go_version != 'tip' }}
|
|
|
|
uses: actions/setup-go@master
|
2021-05-01 19:53:15 +02:00
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go_version }}
|
2023-03-01 13:51:24 +01:00
|
|
|
check-latest: true
|
|
|
|
- name: Install Go ${{ matrix.go_version }}
|
|
|
|
if: ${{ matrix.go_version == 'tip' }}
|
|
|
|
run: |
|
2024-10-27 19:10:26 +01:00
|
|
|
go install golang.org/dl/gotip@latest
|
|
|
|
`go env GOPATH`/bin/gotip download
|
|
|
|
- name: Vet and test no tip
|
|
|
|
if: ${{ matrix.go_version != 'tip' }}
|
2021-05-01 19:53:15 +02:00
|
|
|
run: |
|
|
|
|
go version
|
|
|
|
go vet ./...
|
|
|
|
go test ./...
|
2024-10-27 19:10:26 +01:00
|
|
|
- name: Vet and test gotip
|
|
|
|
if: ${{ matrix.go_version == 'tip' }}
|
|
|
|
run: |
|
|
|
|
`go env GOPATH`/bin/gotip version
|
|
|
|
`go env GOPATH`/bin/gotip vet ./...
|
|
|
|
`go env GOPATH`/bin/gotip test ./...
|
2021-12-26 14:03:27 +01:00
|
|
|
golangci:
|
|
|
|
name: Linting
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2023-03-01 13:51:24 +01:00
|
|
|
- uses: actions/setup-go@master
|
2021-12-26 14:03:27 +01:00
|
|
|
with:
|
2024-10-27 19:10:26 +01:00
|
|
|
go-version: '1.23'
|
2023-03-01 13:51:24 +01:00
|
|
|
check-latest: true
|
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"
|