-
Notifications
You must be signed in to change notification settings - Fork 31
74 lines (64 loc) · 2.06 KB
/
go.yaml
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: go-build
on: [ push, pull_request ]
jobs:
build:
name: build ( ${{ matrix.go-version }} ), test, lint
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.19', '1.20', '1.21.x' ]
steps:
- name: Check out source code
uses: actions/checkout@v4
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Build
env:
GOPROXY: "https://proxy.golang.org"
run: go build .
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
skip-go-installation: true
- name: Test
env:
GOPROXY: "https://proxy.golang.org"
run: go test -v -race -coverprofile=coverage.out ./...
- name: convert to lcov
if: ${{ matrix.go-version }} == '1.15'
run: |
go install github.com/jandelgado/gcov2lcov@latest
$(go env GOPATH)/bin/gcov2lcov -infile=coverage.out -outfile=coverage.lcov
- name: Coveralls
uses: coverallsapp/github-action@master
if: ${{ matrix.go-version }} == '1.15'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.lcov
build-opencencus-check-listener:
name: build ( ${{ matrix.go-version }} ), test, lint for opencensus
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.19', '1.20', '1.21.x' ]
steps:
- name: Check out source code
uses: actions/checkout@v4
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Build
env:
GOPROXY: "https://proxy.golang.org"
run: cd opencensus && go build .
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
skip-go-installation: true
- name: Test
env:
GOPROXY: "https://proxy.golang.org"
run: cd opencensus && go test -v -race -coverprofile=coverage.out ./...