-
Notifications
You must be signed in to change notification settings - Fork 28
137 lines (110 loc) · 3.2 KB
/
ci.yml
File metadata and controls
137 lines (110 loc) · 3.2 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: CI
on:
push:
branches: [ main ]
pull_request:
schedule:
- cron: '0 */6 * * *' # Every 6 hours - catch tempo drift early
workflow_dispatch: # Manual trigger
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.24']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ matrix.go-version }}-
- name: Download dependencies
run: go mod download
- name: Run checks and tests
run: make check
- name: Build examples
run: make build_examples
integration-localnet:
name: Integration Tests (Localnet)
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
- name: Download dependencies
run: go mod download
- name: Start Tempo node
run: docker compose up -d
- name: Wait for Tempo node to be ready
run: |
echo "Waiting for Tempo node to start..."
for i in {1..30}; do
if curl -s http://localhost:8545 > /dev/null 2>&1; then
echo "Tempo node is ready!"
exit 0
fi
echo "Attempt $i: Tempo node not ready yet..."
sleep 2
done
echo "Tempo node failed to start"
docker compose logs
exit 1
- name: Run integration tests (offline only - localnet lacks tempo_fundAddress)
run: go test -v -run "TestIntegration_NodeConnection|TestIntegration_BuilderValidation|TestIntegration_RoundTrip" -timeout=5m ./tests
env:
TEMPO_RPC_URL: http://localhost:8545
- name: Show Tempo node logs on failure
if: failure()
run: docker compose logs
- name: Stop Tempo node
if: always()
run: docker compose down
integration-devnet:
name: Integration Tests (Devnet)
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
- name: Download dependencies
run: go mod download
- name: Run integration tests against devnet
run: go test -v -run TestIntegration -timeout=10m ./tests
env:
TEMPO_RPC_URL: ${{ secrets.DEVNET_RPC_URL }}
integration-testnet:
name: Integration Tests (Testnet)
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
- name: Download dependencies
run: go mod download
- name: Run integration tests against testnet
run: go test -v -run TestIntegration -timeout=10m ./tests
env:
TEMPO_RPC_URL: ${{ secrets.TESTNET_RPC_URL }}