Skip to content

Commit a71ae71

Browse files
committed
Add test execution step to SDK build workflow
Introduces a 'Run Tests' step in the sdk-build-validation workflow for multiple SDKs. This step runs the appropriate test command for each SDK and handles cases where no tests are available.
1 parent 8dfc5c5 commit a71ae71

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/sdk-build-validation.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,3 +197,45 @@ jobs:
197197
exit 1
198198
;;
199199
esac
200+
201+
- name: Run Tests
202+
working-directory: examples/${{ matrix.sdk }}
203+
run: |
204+
case "${{ matrix.sdk }}" in
205+
web|node|cli|react-native)
206+
npm test || echo "No tests available"
207+
;;
208+
flutter)
209+
flutter test || echo "No tests available"
210+
;;
211+
apple|swift)
212+
swift test || echo "No tests available"
213+
;;
214+
android)
215+
./gradlew test || echo "No tests available"
216+
;;
217+
kotlin)
218+
./gradlew test || echo "No tests available"
219+
;;
220+
php)
221+
vendor/bin/phpunit || echo "No tests available"
222+
;;
223+
python)
224+
python -m pytest || echo "No tests available"
225+
;;
226+
ruby)
227+
bundle exec rake test || bundle exec rspec || echo "No tests available"
228+
;;
229+
dart)
230+
dart test || echo "No tests available"
231+
;;
232+
go)
233+
go test ./... || echo "No tests available"
234+
;;
235+
dotnet)
236+
dotnet test || echo "No tests available"
237+
;;
238+
*)
239+
echo "No tests for SDK: ${{ matrix.sdk }}"
240+
;;
241+
esac

0 commit comments

Comments
 (0)