-
Notifications
You must be signed in to change notification settings - Fork 0
248 lines (232 loc) · 7.88 KB
/
Copy pathsdk-conformance.yml
File metadata and controls
248 lines (232 loc) · 7.88 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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
name: SDK Conformance Certification
on:
schedule:
- cron: '0 2 * * 1' # Weekly Mondays 2am UTC
push:
branches: [main]
paths: ['src/protocol/**', 'src/storage/**', 'src/consumer/**']
workflow_dispatch:
concurrency:
group: sdk-conformance
cancel-in-progress: true
permissions:
contents: read
env:
STREAMLINE_IMAGE: ghcr.io/streamlinelabs/streamline:latest
jobs:
build-server:
name: Build Streamline Server
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Build release
run: cargo build --release
- name: Upload binary
uses: actions/upload-artifact@v4
with:
name: streamline-binary
path: target/release/streamline
retention-days: 1
conformance-java:
name: Java SDK Conformance
needs: build-server
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: streamlinelabs/streamline-java-sdk
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Run conformance tests
run: |
cd testcontainers
mvn test -Dtest="*Conformance*" -pl . || mvn test -pl .
- name: Generate conformance report
if: always()
run: |
echo '{"sdk": "streamline-java-sdk", "status": "${{ job.status }}"}' > conformance-java.json
- uses: actions/upload-artifact@v4
if: always()
with:
name: conformance-java
path: conformance-java.json
conformance-python:
name: Python SDK Conformance
needs: build-server
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: streamlinelabs/streamline-python-sdk
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
pip install -e ".[dev]"
pip install -e testcontainers/
- name: Run conformance tests
run: pytest tests/ -k "conformance or test_C or test_T or test_P or test_N or test_G or test_E" -v --timeout=60 || pytest tests/ -v --timeout=60
- name: Generate conformance report
if: always()
run: echo '{"sdk": "streamline-python-sdk", "status": "${{ job.status }}"}' > conformance-python.json
- uses: actions/upload-artifact@v4
if: always()
with:
name: conformance-python
path: conformance-python.json
conformance-go:
name: Go SDK Conformance
needs: build-server
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: streamlinelabs/streamline-go-sdk
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Run conformance tests
run: go test ./... -v -timeout 120s -run "Conformance|TestC0|TestT0|TestP0|TestN0|TestG0|TestE0" || go test ./... -v -timeout 120s
- name: Generate conformance report
if: always()
run: echo '{"sdk": "streamline-go-sdk", "status": "${{ job.status }}"}' > conformance-go.json
- uses: actions/upload-artifact@v4
if: always()
with:
name: conformance-go
path: conformance-go.json
conformance-node:
name: Node.js SDK Conformance
needs: build-server
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: streamlinelabs/streamline-node-sdk
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install & test
run: |
npm ci
npm run build
npm test -- --reporter=verbose || true
- name: Generate conformance report
if: always()
run: echo '{"sdk": "streamline-node-sdk", "status": "${{ job.status }}"}' > conformance-node.json
- uses: actions/upload-artifact@v4
if: always()
with:
name: conformance-node
path: conformance-node.json
conformance-dotnet:
name: .NET SDK Conformance
needs: build-server
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: streamlinelabs/streamline-dotnet-sdk
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0'
- name: Test
run: dotnet test --verbosity normal --filter "Conformance|C01|T01|P01|N01|G01|E01" || dotnet test --verbosity normal
- name: Generate conformance report
if: always()
run: echo '{"sdk": "streamline-dotnet-sdk", "status": "${{ job.status }}"}' > conformance-dotnet.json
- uses: actions/upload-artifact@v4
if: always()
with:
name: conformance-dotnet
path: conformance-dotnet.json
conformance-rust:
name: Rust SDK Conformance
needs: build-server
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: streamlinelabs/streamline-rust-sdk
- uses: dtolnay/rust-toolchain@stable
- name: Test
run: cargo test -- conformance || cargo test
- name: Generate conformance report
if: always()
run: echo '{"sdk": "streamline-rust-sdk", "status": "${{ job.status }}"}' > conformance-rust.json
- uses: actions/upload-artifact@v4
if: always()
with:
name: conformance-rust
path: conformance-rust.json
conformance-kotlin:
name: Kotlin SDK Conformance
needs: build-server
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: streamlinelabs/streamline-kotlin-sdk
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- uses: gradle/actions/setup-gradle@v4
- name: Test
run: ./gradlew test || gradle test
- name: Generate conformance report
if: always()
run: echo '{"sdk": "streamline-kotlin-sdk", "status": "${{ job.status }}"}' > conformance-kotlin.json
- uses: actions/upload-artifact@v4
if: always()
with:
name: conformance-kotlin
path: conformance-kotlin.json
conformance-swift:
name: Swift SDK Conformance
needs: build-server
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
repository: streamlinelabs/streamline-swift-sdk
- name: Test
run: swift test
- name: Generate conformance report
if: always()
run: echo '{"sdk": "streamline-swift-sdk", "status": "${{ job.status }}"}' > conformance-swift.json
- uses: actions/upload-artifact@v4
if: always()
with:
name: conformance-swift
path: conformance-swift.json
summary:
name: Certification Summary
needs: [conformance-java, conformance-python, conformance-go, conformance-node, conformance-dotnet, conformance-rust, conformance-kotlin, conformance-swift]
if: always()
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
pattern: conformance-*
merge-multiple: true
- name: Generate certification matrix
run: |
echo "# SDK Conformance Results" > $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| SDK | Status |" >> $GITHUB_STEP_SUMMARY
echo "|-----|--------|" >> $GITHUB_STEP_SUMMARY
for f in conformance-*.json; do
sdk=$(python3 -c "import json; print(json.load(open('$f'))['sdk'])" 2>/dev/null || echo "unknown")
status=$(python3 -c "import json; print(json.load(open('$f'))['status'])" 2>/dev/null || echo "unknown")
if [ "$status" = "success" ]; then
echo "| $sdk | ✅ Certified |" >> $GITHUB_STEP_SUMMARY
else
echo "| $sdk | ❌ $status |" >> $GITHUB_STEP_SUMMARY
fi
done