-
Notifications
You must be signed in to change notification settings - Fork 1
74 lines (70 loc) · 1.65 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Build
'on':
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
strategy:
matrix:
go:
- '1.17'
os:
- ubuntu-latest
- windows-latest
- macos-latest
runs-on: '${{ matrix.os }}'
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '${{ matrix.go }}'
- name: Prerequisites
run: make prerequisites
- name: Lint
run: make lint
- name: Test
run: make test
- name: Stash test results
uses: actions/upload-artifact@master
with:
name: "Test results"
path: .coverage.out
retention-days: 7
coverage:
name: coverage
runs-on: ubuntu-latest
needs:
- test
steps:
- uses: actions/checkout@v2
- name: Unstash test results
uses: actions/download-artifact@master
with:
name: "Test results"
- name: Upload test results
uses: paambaati/codeclimate-action@v3.0.0
env:
CC_TEST_REPORTER_ID: 20a724e6a2bf80ab3a3cb88c02df2e95bf918da42e63bc5eaa6f0c9dfbe7e77d
with:
prefix: github.com/${{github.repository}}
coverageLocations: ${{github.workspace}}/.coverage.out:gocov
build:
name: build
runs-on: ubuntu-latest
needs:
- test
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.17'
- name: Prerequisites
run: make prerequisites
- name: Build
run: make build