forked from manucorporat/sse
-
Notifications
You must be signed in to change notification settings - Fork 30
55 lines (50 loc) · 1.24 KB
/
go.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
name: Go
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Setup go
uses: actions/setup-go@v3
with:
go-version: 1.16
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup golangci-lint
uses: golangci/[email protected]
with:
version: v1.41.1
args: --verbose
build:
runs-on: ubuntu-latest
env:
GO111MODULE: on
strategy:
matrix:
go-version: [1.13, 1.14, 1.15, 1.16, 1.17]
steps:
- uses: actions/checkout@v3
- uses: actions/[email protected]
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Build
run: go build -v ./...
- name: Test
run: go test -race -v -count=1 -coverprofile=coverage.out ./...
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: go-${{ matrix.go-version }}