-
Notifications
You must be signed in to change notification settings - Fork 2.4k
92 lines (76 loc) · 2.2 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Build and Test
on: [push, pull_request]
concurrency:
# Cancel any previous workflows if they are from a PR or push.
group: ${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
# go needs absolute directories, using the $HOME variable doesn't work here.
GOCACHE: /home/runner/work/go/pkg/build
GOPATH: /home/runner/work/go
GO_VERSION: 1.22.6
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Check out source
uses: actions/checkout@v4
- name: Build
run: make build
test-cover:
name: Unit coverage
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Check out source
uses: actions/checkout@v4
- name: Test
run: make unit-cover
- name: Send top-level coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: coverage.txt
flag-name: btcd
parallel: true
- name: Send btcec
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: btcec/coverage.txt
flag-name: btcec
parallel: true
- name: Send btcutil coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: btcutil/coverage.txt
flag-name: btcutil
parallel: true
- name: Send btcutil coverage for psbt package
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: btcutil/psbt/coverage.txt
flag-name: btcutilpsbt
parallel: true
- name: Notify coveralls all reports sent
uses: shogo82148/actions-goveralls@v1
with:
parallel-finished: true
test-race:
name: Unit race
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Check out source
uses: actions/checkout@v4
- name: Test
run: make unit-race