@@ -12,85 +12,184 @@ jobs:
1212 runs-on : ubuntu-latest
1313
1414 steps :
15- - name : Checkout code
16- uses : actions/checkout@v4
17-
18- - name : Set up Python
19- uses : actions/setup-python@v5
20- with :
21- python-version : ' 3.9'
22-
23- - name : Install Poetry
24- uses : snok/install-poetry@v1
25- with :
26- version : latest
27- virtualenvs-create : true
28- virtualenvs-in-project : true
29-
30- - name : Load cached venv
31- id : cached-poetry-dependencies
32- uses : actions/cache@v4
33- with :
34- path : python-sdk/.venv
35- key : venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
36-
37- - name : Install dependencies
38- if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
39- working-directory : python-sdk
40- run : poetry install --no-interaction --no-root
41-
42- - name : Install project
43- working-directory : python-sdk
44- run : poetry install --no-interaction
45-
46- - name : Run tests
47- working-directory : python-sdk
48- run : poetry run python -m unittest discover tests -v
15+ - name : Checkout code
16+ uses : actions/checkout@v4
17+
18+ - name : Set up Python
19+ uses : actions/setup-python@v5
20+ with :
21+ python-version : ' 3.9'
22+
23+ - name : Install Poetry
24+ uses : snok/install-poetry@v1
25+ with :
26+ version : latest
27+ virtualenvs-create : true
28+ virtualenvs-in-project : true
29+
30+ - name : Load cached venv
31+ id : cached-poetry-dependencies
32+ uses : actions/cache@v4
33+ with :
34+ path : python-sdk/.venv
35+ key : venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
36+
37+ - name : Install dependencies
38+ if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
39+ working-directory : python-sdk
40+ run : poetry install --no-interaction --no-root
41+
42+ - name : Install project
43+ working-directory : python-sdk
44+ run : poetry install --no-interaction
45+
46+ - name : Run tests
47+ working-directory : python-sdk
48+ run : poetry run python -m unittest discover tests -v
4949
5050 typescript :
5151 name : TypeScript SDK Tests
5252 runs-on : ubuntu-latest
5353
5454 steps :
55- - name : Checkout code
56- uses : actions/checkout@v4
57-
58- - name : Set up Node.js
59- uses : actions/setup-node@v4
60- with :
61- node-version : ' 22'
62-
63- - name : Install protoc
64- uses : arduino/setup-protoc@v3
65- with :
66- version : " 25.x"
67- repo-token : ${{ secrets.GITHUB_TOKEN }}
68-
69- - name : Install pnpm
70- uses : pnpm/action-setup@v4
71- with :
72- version : 10.13.1
73-
74- - name : Setup pnpm cache
75- uses : actions/cache@v4
76- with :
77- path : ~/.local/share/pnpm/store
78- key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
79- restore-keys : |
80- ${{ runner.os }}-pnpm-store-
81-
82- - name : Install dependencies
83- working-directory : typescript-sdk
84- run : pnpm install --frozen-lockfile
85-
86- - name : Test Build
87- working-directory : typescript-sdk
88- run : pnpm run build
55+ - name : Checkout code
56+ uses : actions/checkout@v4
57+
58+ - name : Set up Node.js
59+ uses : actions/setup-node@v4
60+ with :
61+ node-version : ' 22'
62+
63+ - name : Install protoc
64+ uses : arduino/setup-protoc@v3
65+ with :
66+ version : " 25.x"
67+ repo-token : ${{ secrets.GITHUB_TOKEN }}
68+
69+ - name : Install pnpm
70+ uses : pnpm/action-setup@v4
71+ with :
72+ version : 10.13.1
73+
74+ - name : Setup pnpm cache
75+ uses : actions/cache@v4
76+ with :
77+ path : ~/.local/share/pnpm/store
78+ key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
79+ restore-keys : |
80+ ${{ runner.os }}-pnpm-store-
81+
82+ - name : Install dependencies
83+ working-directory : typescript-sdk
84+ run : pnpm install --frozen-lockfile
85+
86+ - name : Test Build
87+ working-directory : typescript-sdk
88+ run : pnpm run build
89+
90+ - name : Run tests
91+ working-directory : typescript-sdk
92+ run : pnpm run test
93+
94+ go :
95+ name : Go SDK Tests
96+ runs-on : ubuntu-latest
8997
90- - name : Run tests
91- working-directory : typescript-sdk
92- run : pnpm run test
98+ steps :
99+ - name : Checkout code
100+ uses : actions/checkout@v4
101+
102+ - name : Set up Go
103+ uses : actions/setup-go@v5
104+ with :
105+ go-version : ' 1.24.4'
106+
107+ - name : Setup Go module cache
108+ uses : actions/cache@v4
109+ with :
110+ path : |
111+ ~/go/pkg/mod
112+ ~/.cache/go-build
113+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
114+ restore-keys : |
115+ ${{ runner.os }}-go-
116+
117+ - name : Download dependencies
118+ working-directory : sdks/community/go
119+ run : go mod download
120+
121+ - name : Run tests
122+ working-directory : sdks/community/go
123+ run : go test ./... -v
124+
125+ kotlin :
126+ name : Kotlin SDK Tests
127+ runs-on : ubuntu-latest
93128
129+ steps :
130+ - name : Checkout code
131+ uses : actions/checkout@v4
132+
133+ - name : Set up JDK 21
134+ uses : actions/setup-java@v4
135+ with :
136+ java-version : ' 21'
137+ distribution : ' temurin'
138+
139+ - name : Setup Gradle
140+ uses : gradle/gradle-build-action@v3
141+
142+ - name : Run JVM tests
143+ working-directory : sdks/community/kotlin/library
144+ run : ./gradlew jvmTest --no-daemon --stacktrace
145+
146+ - name : Parse test results
147+ if : always()
148+ working-directory : sdks/community/kotlin/library
149+ run : |
150+ echo "## Kotlin SDK Test Results Summary"
151+ echo ""
152+
153+ total_tests=0
154+ total_failures=0
155+ total_errors=0
156+
157+ for module in core client tools; do
158+ xml_dir="$module/build/test-results/jvmTest"
159+
160+ if [ -d "$xml_dir" ]; then
161+ # Sum up test counts from all XML files in the directory
162+ module_tests=$(find "$xml_dir" -name "*.xml" -exec grep -h '<testsuite' {} \; | grep -o 'tests="[0-9]*"' | sed 's/tests="\([0-9]*\)"/\1/' | awk '{sum += $1} END {print sum}')
163+ module_failures=$(find "$xml_dir" -name "*.xml" -exec grep -h '<testsuite' {} \; | grep -o 'failures="[0-9]*"' | sed 's/failures="\([0-9]*\)"/\1/' | awk '{sum += $1} END {print sum}')
164+ module_errors=$(find "$xml_dir" -name "*.xml" -exec grep -h '<testsuite' {} \; | grep -o 'errors="[0-9]*"' | sed 's/errors="\([0-9]*\)"/\1/' | awk '{sum += $1} END {print sum}')
165+
166+ # Default to 0 if empty
167+ module_tests=${module_tests:-0}
168+ module_failures=${module_failures:-0}
169+ module_errors=${module_errors:-0}
170+
171+ if [ "$module_tests" -gt 0 ]; then
172+ echo "✅ kotlin-$module: $module_tests tests, $module_failures failures, $module_errors errors"
173+ total_tests=$((total_tests + module_tests))
174+ total_failures=$((total_failures + module_failures))
175+ total_errors=$((total_errors + module_errors))
176+ fi
177+ fi
178+ done
179+
180+ echo ""
181+ echo "---"
182+ echo "### Overall Results: $total_tests tests, $total_failures failures, $total_errors errors"
183+
184+ if [ $total_failures -gt 0 ] || [ $total_errors -gt 0 ]; then
185+ echo "❌ Some tests failed"
186+ exit 1
187+ elif [ $total_tests -eq 0 ]; then
188+ echo "⚠️ No tests were found or executed"
189+ exit 1
190+ else
191+ echo "✅ All $total_tests tests passed!"
192+ fi
94193 java :
95194 name : Java SDK Tests
96195 runs-on : ubuntu-latest
0 commit comments