-
Notifications
You must be signed in to change notification settings - Fork 16
48 lines (41 loc) · 1.09 KB
/
build.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
name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
lint:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Get golangci-lint
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.61.0
- name: Run golangci-lint
run: |
./bin/golangci-lint run --out-format=github-actions --issues-exit-code=1
build:
name: Build Go ${{ matrix.go }}
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.22', '1.21', '1.20', '1.19', '1.18']
env:
CGO_ENABLED: 0
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Setup go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go }}
- name: Get dependencies
run: |
go get -v -t -d ./...
- name: go vet
run: go vet ./...
- name: Test
run: go test -tags=test -count=1 ./...