Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDK typechecks in CI #577

Closed
wants to merge 15 commits into from
56 changes: 56 additions & 0 deletions .github/workflows/sdk-typecheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: SDK Typecheck

on:
pull_request:
paths:
- 'openapi/video-openapi-clientside.yaml'

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
video-sdk-typecheck:
name: Video SDK Typecheck
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: protocol

- name: Compile definitions
run: |
docker run --rm \
-v $(pwd)/protocol:/local openapitools/openapi-generator-cli generate \
-i /local/openapi/video-openapi-clientside.yaml \
-g typescript-fetch \
-o /local/ts-sdk \
--additional-properties=supportsES6=true \
--additional-properties=modelPropertyNaming=original \
--additional-properties=enumPropertyNaming=UPPERCASE \
--additional-properties=withoutRuntimeChecks=true

- name: Checkout SDK
uses: actions/checkout@v4
with:
repository: 'GetStream/stream-video-js'
path: stream-video-js

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'yarn'
cache-dependency-path: stream-video-js/yarn.lock

- name: Install SDK dependencies and sneak in updated types
working-directory: stream-video-js
run: |
yarn install --immutable
rm -r packages/client/src/gen/coordinator
cp -r ../protocol/ts-sdk packages/client/src/gen/coordinator

- name: Typecheck
working-directory: stream-video-js
run: yarn run build:client
1 change: 1 addition & 0 deletions openapi/video-openapi-clientside.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4330,6 +4330,7 @@ components:
required:
- width
- height
- bitrate
type: object
Thresholds:
description: Sets thresholds for AI moderation
Expand Down
Loading