@@ -12,184 +12,185 @@ jobs:
1212 runs-on : ubuntu-latest
1313
1414 steps :
15- - name : Checkout code
16- uses : actions/checkout@v4
15+ - name : Checkout code
16+ uses : actions/checkout@v4
1717
18- - name : Set up Python
19- uses : actions/setup-python@v5
20- with :
21- python-version : ' 3.9'
18+ - name : Set up Python
19+ uses : actions/setup-python@v5
20+ with :
21+ python-version : ' 3.9'
2222
23- - name : Install Poetry
24- uses : snok/install-poetry@v1
25- with :
26- version : latest
27- virtualenvs-create : true
28- virtualenvs-in-project : true
23+ - name : Install Poetry
24+ uses : snok/install-poetry@v1
25+ with :
26+ version : latest
27+ virtualenvs-create : true
28+ virtualenvs-in-project : true
2929
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') }}
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') }}
3636
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
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
4141
42- - name : Install project
43- working-directory : python-sdk
44- run : poetry install --no-interaction
42+ - name : Install project
43+ working-directory : python-sdk
44+ run : poetry install --no-interaction
4545
46- - name : Run tests
47- working-directory : python-sdk
48- run : poetry run python -m unittest discover tests -v
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
55+ - name : Checkout code
56+ uses : actions/checkout@v4
5757
58- - name : Set up Node.js
59- uses : actions/setup-node@v4
60- with :
61- node-version : ' 22'
58+ - name : Set up Node.js
59+ uses : actions/setup-node@v4
60+ with :
61+ node-version : ' 22'
6262
63- - name : Install protoc
64- uses : arduino/setup-protoc@v3
65- with :
66- version : " 25.x"
67- repo-token : ${{ secrets.GITHUB_TOKEN }}
63+ - name : Install protoc
64+ uses : arduino/setup-protoc@v3
65+ with :
66+ version : " 25.x"
67+ repo-token : ${{ secrets.GITHUB_TOKEN }}
6868
69- - name : Install pnpm
70- uses : pnpm/action-setup@v4
71- with :
72- version : 10.13.1
69+ - name : Install pnpm
70+ uses : pnpm/action-setup@v4
71+ with :
72+ version : 10.13.1
7373
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-
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-
8181
82- - name : Install dependencies
83- working-directory : typescript-sdk
84- run : pnpm install --frozen-lockfile
82+ - name : Install dependencies
83+ working-directory : typescript-sdk
84+ run : pnpm install --frozen-lockfile
8585
86- - name : Test Build
87- working-directory : typescript-sdk
88- run : pnpm run build
86+ - name : Test Build
87+ working-directory : typescript-sdk
88+ run : pnpm run build
8989
90- - name : Run tests
91- working-directory : typescript-sdk
92- run : pnpm run test
90+ - name : Run tests
91+ working-directory : typescript-sdk
92+ run : pnpm run test
9393
9494 go :
9595 name : Go SDK Tests
9696 runs-on : ubuntu-latest
9797
9898 steps :
99- - name : Checkout code
100- uses : actions/checkout@v4
99+ - name : Checkout code
100+ uses : actions/checkout@v4
101101
102- - name : Set up Go
103- uses : actions/setup-go@v5
104- with :
105- go-version : ' 1.24.4'
102+ - name : Set up Go
103+ uses : actions/setup-go@v5
104+ with :
105+ go-version : ' 1.24.4'
106106
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-
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-
116116
117- - name : Download dependencies
118- working-directory : sdks/community/go
119- run : go mod download
117+ - name : Download dependencies
118+ working-directory : sdks/community/go
119+ run : go mod download
120120
121- - name : Run tests
122- working-directory : sdks/community/go
123- run : go test ./... -v
121+ - name : Run tests
122+ working-directory : sdks/community/go
123+ run : go test ./... -v
124124
125125 kotlin :
126126 name : Kotlin SDK Tests
127127 runs-on : ubuntu-latest
128128
129129 steps :
130- - name : Checkout code
131- uses : actions/checkout@v4
130+ - name : Checkout code
131+ uses : actions/checkout@v4
132132
133- - name : Set up JDK 21
134- uses : actions/setup-java@v4
135- with :
136- java-version : ' 21'
137- distribution : ' temurin'
133+ - name : Set up JDK 21
134+ uses : actions/setup-java@v4
135+ with :
136+ java-version : ' 21'
137+ distribution : ' temurin'
138138
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
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))
177176 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!"
192177 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
193+
193194 java :
194195 name : Java SDK Tests
195196 runs-on : ubuntu-latest
@@ -199,15 +200,15 @@ jobs:
199200 working-directory : sdks/community/java
200201
201202 steps :
202- - name : Checkout code
203- uses : actions/checkout@v4
203+ - name : Checkout code
204+ uses : actions/checkout@v4
204205
205- - name : Set up Java
206- uses : actions/setup-java@v4
207- with :
208- distribution : ' temurin'
209- java-version : ' 17'
210- cache : ' maven'
206+ - name : Set up Java
207+ uses : actions/setup-java@v4
208+ with :
209+ distribution : ' temurin'
210+ java-version : ' 17'
211+ cache : ' maven'
211212
212- - name : Run tests
213- run : mvn -B -ntp test
213+ - name : Run tests
214+ run : mvn -B -ntp test
0 commit comments