-
Notifications
You must be signed in to change notification settings - Fork 2
60 lines (57 loc) · 1.37 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
name: Build
"on":
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
strategy:
matrix:
go:
- "^1.22"
os:
- ubuntu-latest
- windows-latest
- macos-latest
runs-on: "${{ matrix.os }}"
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
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
- name: Build
run: make build
coverage:
name: coverage
runs-on: ubuntu-latest
needs:
- test
steps:
- uses: actions/checkout@v3
- 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