-
Notifications
You must be signed in to change notification settings - Fork 1.5k
60 lines (60 loc) · 1.56 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: test
on:
pull_request:
branches:
- "*"
push:
branches:
- "*"
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go_version:
- '1.21'
- '1.22'
- '1.23'
- tip
name: Test with ${{ matrix.go_version }}
steps:
- uses: actions/checkout@v2
- name: Install Go ${{ matrix.go_version }}
if: ${{ matrix.go_version != 'tip' }}
uses: actions/setup-go@master
with:
go-version: ${{ matrix.go_version }}
check-latest: true
- name: Install Go ${{ matrix.go_version }}
if: ${{ matrix.go_version == 'tip' }}
run: |
go install golang.org/dl/gotip@latest
`go env GOPATH`/bin/gotip download
- name: Vet and test no tip
if: ${{ matrix.go_version != 'tip' }}
run: |
go version
go vet ./...
go test ./...
- 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 ./...
golangci:
name: Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@master
with:
go-version: '1.23'
check-latest: true
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: latest
skip-go-installation: true
args: "--config .golangci.yml"