forked from lightningnetwork/lnd
-
Notifications
You must be signed in to change notification settings - Fork 21
100 lines (83 loc) · 3.06 KB
/
go.yml
File metadata and controls
100 lines (83 loc) · 3.06 KB
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
93
94
95
96
97
98
name: Build and Test
on: [push, pull_request]
permissions:
contents: read
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.24', '1.25']
steps:
- name: Set up Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 #5.5.0
with:
go-version: ${{ matrix.go }}
- name: Check out source
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
- name: Install Linters
run: "go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.8"
- name: Check golangci-lint version
run: golangci-lint --version
- name: Build
run: go build ./...
- name: Lint
run: |
golangci-lint run --out-format=github-actions
- name: Package test binaries
run: |
export GOPATH=$(go env GOPATH)
make package-test-binaries
- name: Upload test binaries
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 #v4.6.0
with:
name: ${{ matrix.go }}-test-binaries
path: dcrlnd_testbins.tar.gz
testsuite:
name: Test
needs: build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go: ['1.25']
testsuite:
- unit-race # unit tests
- itest-parallel-run # embedded wallet using dcrd for sync and chain ops
- itest-parallel-run walletimpl=embeddedwallet_dcrw # embedded wallet, dcrd sync but dcrw chain ops
- itest-parallel-run walletimpl=embeddedwallet_dcrw backend=spv # embedded wallet, spv sync and dcrw chain ops
- itest-parallel-run walletimpl=remotewallet # remote wallet dcrd sync
- itest-parallel-run walletimpl=remotewallet backend=spv # remote wallet spv sync
steps:
- name: Set up Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 #5.5.0
with:
go-version: ${{ matrix.go }}
- name: Check out source
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
- name: Download the test binaries
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 #v4.1.8
with:
name: ${{ matrix.go }}-test-binaries
path: ${{ matrix.go }}-test-binaries
- name: Unpack the test binaries
run: |
export GOPATH=$(go env GOPATH)
mv ${{ matrix.go }}-test-binaries/* .
make unpack-test-binaries
- name: Run the test suite
run: |
export GOPATH=$(go env GOPATH)
export PATH=${PATH}:$(go env GOPATH)/bin
make ${{ matrix.testsuite }}
- name: Compress log files
if: always()
run: |
find . -iname *.log | tar -T - --ignore-failed-read -czf output-logs.tar.gz
- name: Upload logs
if: always()
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 #v4.6.0
with:
name: ${{ matrix.go }}-${{ matrix.testsuite }}-logs.tar.gz
path: output-logs.tar.gz