Skip to content

Conversation

@pvditto
Copy link
Contributor

@pvditto pvditto commented Sep 11, 2025

Summary

This PR adds optional input parameters to all BrowserStack workflows, enabling testing of new Ditto cloud deployments with custom configuration.

Supported workflows:

  • android-kotlin-ci.yml
  • swift-ci.yml
  • javascript-web-browserstack.yml
  • android-cpp-browserstack.yml

All workflows now accept these optional inputs (all default to repository secrets when not provided):

  • websocket_url - Custom Ditto websocket URL
  • app_id - Custom Ditto app ID
  • playground_token - Custom Ditto playground token
  • auth_url - Custom Ditto auth URL

React Native Fix

  • Fixed React Native app to actually use the DITTO_WEBSOCKET_URL environment variable
  • Previously it was defined in env.d.ts but not used in the transport config
  • Now properly configures websocket URL via updateTransportConfig

Usage

Automatic Dispatch with Script

The scripts/cloud-smoke-test.js script can dispatch all BrowserStack workflows and monitor their progress:

Basic usage (uses environment variables for all config):

node scripts/cloud-smoke-test.js

With custom websocket URL:

node scripts/cloud-smoke-test.js --websocket-url wss://staging.example.com/ws

With multiple custom parameters:

node scripts/cloud-smoke-test.js \
  --websocket-url wss://staging.example.com/ws \
  --app-id staging-app-id \
  --playground-token staging-token

All available options:

  • --websocket-url <url> - Custom websocket URL
  • --app-id <id> - Custom app ID
  • --playground-token <token> - Custom playground token
  • --auth-url <url> - Custom auth URL
  • --help - Show help message

All parameters are optional and fall back to these environment variables:

  • DITTO_WEBSOCKET_URL
  • DITTO_APP_ID
  • DITTO_PLAYGROUND_TOKEN
  • DITTO_AUTH_URL

The script will:

  1. Validate inputs
  2. Dispatch all 4 BrowserStack workflows in parallel
  3. Monitor progress with colored output
  4. Wait up to 45 minutes for completion
  5. Report final results
  6. Exit with appropriate status code (0 = success, 1 = failure)

Manual Dispatch

To test individual workflows manually:

  1. Go to Actions tab → Select any supported BrowserStack workflow
  2. Click "Run workflow"
  3. Enter custom values in the input fields (optional)
  4. Leave fields blank to use defaults from secrets

All parameters are completely optional - workflows will use repository secrets as defaults when inputs are not provided.

- Add workflow_dispatch input for custom websocket URL to:
  - android-kotlin-ci.yml
  - swift-ci.yml
  - javascript-web-browserstack.yml
  - android-cpp-browserstack.yml
- Default to existing secrets when input not provided
- Enables testing new websocket server versions via manual workflow dispatch

Note: React Native app was also updated to use DITTO_WEBSOCKET_URL
environment variable (was previously defined but not used)
@pvditto pvditto changed the title Add optional websocket URL input to BrowserStack workflows Allow one-off Browserstack CI dispatch with custom websocket URL Sep 11, 2025
@pvditto pvditto self-assigned this Sep 11, 2025
@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions
Copy link

📱 BrowserStack Test Results

Status: ✅ Passed
Build: #105
BrowserStack: View detailed results

Tested Devices:

  • Google Pixel 8 (Android 14)
  • Samsung Galaxy S23 (Android 13)
  • Google Pixel 6 (Android 12)
  • OnePlus 9 (Android 11)

@github-actions
Copy link

📱 BrowserStack Test Results

Status: ✅ Passed
Build: #108
BrowserStack: View detailed results

Tested Devices:

  • Google Pixel 8 (Android 14)
  • Samsung Galaxy S23 (Android 13)
  • Google Pixel 6 (Android 12)
  • OnePlus 9 (Android 11)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant