-
Notifications
You must be signed in to change notification settings - Fork 18
162 lines (141 loc) · 4.87 KB
/
statestore-test.yml
File metadata and controls
162 lines (141 loc) · 4.87 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
name: StateStore Test
on:
push:
branches: [ main, master, develop ]
paths:
- 'fs/statestore/**'
- 'scripts/build-rocksdb.sh'
- 'Makefile'
- '.github/workflows/statestore-test.yml'
pull_request:
branches: [ main, master, develop ]
paths:
- 'fs/statestore/**'
- 'scripts/build-rocksdb.sh'
- 'Makefile'
- '.github/workflows/statestore-test.yml'
workflow_dispatch:
jobs:
test-linux:
name: Test on Linux
runs-on: ubuntu-latest
strategy:
matrix:
test-type: [pebble, rocksdb]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Install build tools
run: |
sudo apt-get update
sudo apt-get install -y build-essential git curl
- name: Test Pebble
if: matrix.test-type == 'pebble'
run: make test-statestore
- name: Test RocksDB
if: matrix.test-type == 'rocksdb'
run: make test-statestore-rocksdb
- name: Build with Pebble
if: matrix.test-type == 'pebble'
run: make build-lite
- name: Build with RocksDB
if: matrix.test-type == 'rocksdb'
run: make build-all
- name: Verify binary
run: |
if [ ! -f bin/function-stream ]; then
echo "❌ Binary not found!"
exit 1
fi
echo "✅ Binary created: bin/function-stream"
ls -lh bin/function-stream
- name: Upload Pebble build artifacts
if: matrix.test-type == 'pebble'
uses: actions/upload-artifact@v4
with:
name: function-stream-linux-pebble
path: bin/function-stream
if-no-files-found: error
retention-days: 7
- name: Upload RocksDB build artifacts
if: matrix.test-type == 'rocksdb'
uses: actions/upload-artifact@v4
with:
name: function-stream-linux-rocksdb
path: |
bin/function-stream
bin/function-stream/lib/rocksdb/lib/*.a
if-no-files-found: ignore
retention-days: 7
test-all-statestore:
name: Test All StateStore Implementations
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Install build tools
run: |
sudo apt-get update
sudo apt-get install -y build-essential git curl
- name: Test Pebble
run: make test-statestore
- name: Test RocksDB
run: make test-statestore-rocksdb
- name: Build RocksDB variant
run: make build-all
- name: Verify build artifacts
run: |
echo "=== Build Artifacts ==="
if [ -f bin/function-stream ]; then
echo "✅ Binary: bin/function-stream"
ls -lh bin/function-stream
else
echo "❌ Binary not found!"
exit 1
fi
echo ""
echo "=== RocksDB Libraries ==="
if [ -d bin/function-stream/lib/rocksdb/lib ]; then
ls -lh bin/function-stream/lib/rocksdb/lib/*.a 2>/dev/null || echo "No library files found"
else
echo "⚠️ RocksDB library directory not found"
fi
- name: Upload all artifacts
uses: actions/upload-artifact@v4
with:
name: function-stream-linux-complete
path: |
bin/function-stream
bin/function-stream/lib/rocksdb/lib/*.a
if-no-files-found: ignore
retention-days: 7
summary:
name: Test Summary
runs-on: ubuntu-latest
needs: [test-linux, test-all-statestore]
if: always()
steps:
- name: Generate summary
run: |
echo "## 📊 StateStore Test Results" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### Test Results by Platform" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Platform | StateStore | Status |" >> $GITHUB_STEP_SUMMARY
echo "|----------|------------|--------|" >> $GITHUB_STEP_SUMMARY
echo "| Linux | Pebble | ${{ needs.test-linux.result == 'success' && '✅ Pass' || '❌ Fail' }} |" >> $GITHUB_STEP_SUMMARY
echo "| Linux | RocksDB | ${{ needs.test-linux.result == 'success' && '✅ Pass' || '❌ Fail' }} |" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### Integration Tests" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Platform | Status |" >> $GITHUB_STEP_SUMMARY
echo "|----------|--------|" >> $GITHUB_STEP_SUMMARY
echo "| All Tests (Linux) | ${{ needs.test-all-statestore.result == 'success' && '✅ Pass' || '❌ Fail' }} |" >> $GITHUB_STEP_SUMMARY