Files
wehub-resource-sync 4ce4204b6c
CI / Lint (push) Failing after 2s
CI / Build (push) Has been skipped
SDK CI / PHP SDK (push) Failing after 1s
Split PHP SDK / PHP SDK tests (push) Failing after 1s
CI / Test (push) Failing after 1s
CI / Dashboard (push) Failing after 0s
SDK CI / JavaScript SDK (push) Failing after 0s
SDK CI / Python SDK (push) Failing after 2s
SDK CI / Java SDK (push) Failing after 1s
Split PHP SDK / Mirror sdk/php -> rmyndharis/openwa-php (push) Has been skipped
CI / Test (PostgreSQL migrations) (push) Failing after 7m47s
CI / Docker Build (push) Has been skipped
chore: import upstream snapshot with attribution
2026-07-13 12:24:08 +08:00

76 lines
2.2 KiB
YAML

name: SDK CI
# Runs the JavaScript/Python/PHP client SDK suites. Path-filtered to SDK sources AND the server
# contract surfaces the SDK types mirror (DTOs + the engine interface), so a backend DTO change also
# re-runs the SDK suites and surfaces contract drift. The JavaScript job also builds and runs the
# dual-format packaging smoke test (require() + import() both consumable).
on:
push:
branches: [main, develop]
paths: ['sdk/**', '.github/workflows/sdk-ci.yml', 'src/**/dto/**', 'src/**/*.controller.ts', 'src/**/*.service.ts', 'src/engine/interfaces/whatsapp-engine.interface.ts']
pull_request:
branches: [main, develop]
paths: ['sdk/**', '.github/workflows/sdk-ci.yml', 'src/**/dto/**', 'src/**/*.controller.ts', 'src/**/*.service.ts', 'src/engine/interfaces/whatsapp-engine.interface.ts']
jobs:
javascript:
name: JavaScript SDK
runs-on: ubuntu-latest
defaults:
run:
working-directory: sdk/javascript
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: '22'
cache: 'npm'
cache-dependency-path: sdk/javascript/package-lock.json
- run: npm ci
- run: npm test
- run: npm run build
- run: npm run smoke # dual CJS+ESM consumable — must run after build
python:
name: Python SDK
runs-on: ubuntu-latest
defaults:
run:
working-directory: sdk/python
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
with:
python-version: '3.12'
- run: pip install -e '.[dev]'
- run: pytest
php:
name: PHP SDK
runs-on: ubuntu-latest
defaults:
run:
working-directory: sdk/php
steps:
- uses: actions/checkout@v7
- uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
- run: composer install --no-interaction --no-progress
- run: ./vendor/bin/phpunit
java:
name: Java SDK
runs-on: ubuntu-latest
defaults:
run:
working-directory: sdk/java
steps:
- uses: actions/checkout@v7
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
cache: maven
- run: mvn -B verify