-
Notifications
You must be signed in to change notification settings - Fork 8
56 lines (49 loc) · 1.17 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
49
50
51
52
53
54
55
56
name: build
on:
push:
branches:
- master
paths-ignore:
- .github/**
- .gitignore
- .whitesource
- codecov.yml
- README.md
pull_request:
paths-ignore:
- .github/**
- .gitignore
- .whitesource
- codecov.yml
- README.md
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- go: 1.15
build-with: true
- go: 1.16
build-with: false
continue-on-error: ${{ matrix.build-with == false }}
name: Build with ${{ matrix.go }}
env:
GO111MODULE: on
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go }}
- name: Checkout code
uses: actions/checkout@v2
- name: Vet
run: go vet ./...
- name: Test
run: go test -vet=off -race -coverprofile=coverage.txt -covermode=atomic ./...
- name: Upload code coverage report
if: matrix.build-with == true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: bash <(curl -s https://raw.githubusercontent.com/VividCortex/codecov-bash/master/codecov)