Skip to content

Conversation

@teodorciuraru
Copy link
Contributor

@teodorciuraru teodorciuraru commented Oct 3, 2025

Summary

Refactor all CI workflows to use official BrowserStack GitHub Actions for cleaner credential management.

Workflows Refactored

Selenium (Web Testing with BrowserStackLocal):

  • java-spring-ci.yml - Replaced manual BrowserStackLocal binary management (~40 lines) with setup-env + setup-local actions (~17 lines)
  • javascript-web-ci.yml - Same refactoring as java-spring

Appium (Mobile App Testing):

  • android-cpp-ci.yml - Added setup-env for credential management
  • android-java-ci.yml - Added setup-env for credential management
  • android-kotlin-ci.yml - Added setup-env for Espresso tests
  • dotnet-maui-ci.yml - Added setup-env for Android + iOS tests
  • flutter-ci.yml - Added setup-env for Android + iOS Flutter integration tests
  • kotlin-multiplatform-ci.yml - Added setup-env for Espresso tests
  • react-native-ci.yml - Added setup-env for Android + iOS Maestro tests
  • react-native-expo-ci.yml - Added setup-env for Android + iOS Maestro tests
  • swift-ci.yml - Added setup-env for iOS XCUITest

Total: 11 workflows refactored (2 Selenium, 9 Appium)

Changes Made

For Selenium Workflows (java-spring, javascript-web):

  • Use setup-env action for credentials and build metadata configuration
  • Use setup-local action for tunnel lifecycle management (start/stop)
  • Remove manual binary download, installation, timeout handling, and cleanup
  • Automatic platform detection (linux/darwin/windows)
  • 50% reduction in boilerplate code per workflow

For Appium Workflows (all mobile app testing):

  • Use setup-env action to configure BROWSERSTACK_USERNAME and BROWSERSTACK_ACCESS_KEY environment variables
  • Replace all inline ${{ secrets.BROWSERSTACK_* }} with $BROWSERSTACK_* env vars
  • Remove CREDS variable declarations where they existed
  • Simplify all curl commands for upload, execution, and monitoring steps

Benefits

  • Cleaner code: Centralized credential configuration across all BrowserStack workflows
  • More maintainable: Official GitHub Actions from BrowserStack with built-in error handling
  • Consistent patterns: All 11 workflows now follow the same credential management approach
  • Best practices: Aligned with BrowserStack's official recommendations

Technical Notes

Why only Selenium workflows need setup-local:

  • Selenium workflows test web apps running on localhost (CI runner), so they need BrowserStackLocal tunnel
  • Appium workflows upload APK/IPA to BrowserStack cloud, so apps are already accessible (no tunnel needed)

Why setup-env helps Appium workflows:

  • Sets BROWSERSTACK_USERNAME and BROWSERSTACK_ACCESS_KEY as environment variables
  • Eliminates repetitive ${{ secrets.* }} references in curl commands
  • Standardizes credential configuration with project/build metadata

Stacked on top of #181

🤖 Generated with Claude Code

phatblat and others added 2 commits October 3, 2025 11:05
Replace manual BrowserStackLocal setup with official BrowserStack GitHub Actions:
- Use setup-env action to configure BrowserStack credentials
- Use setup-local action to start/stop BrowserStackLocal tunnel
- Remove manual binary download, installation, and management code
- Simplify tunnel lifecycle management

Benefits:
- Cleaner workflow with less boilerplate
- Official BrowserStack-maintained actions
- Automatic handling of platform-specific binary downloads
- Better error handling and logging

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@teodorciuraru teodorciuraru self-assigned this Oct 3, 2025
Teodor Ciuraru and others added 5 commits October 3, 2025 11:34
Replace manual BrowserStackLocal binary management (~40 lines) with official
BrowserStack GitHub Actions (~17 lines):
- Use setup-env action for credentials and build metadata configuration
- Use setup-local action for tunnel lifecycle management (start/stop)
- Remove manual binary download, installation, and cleanup
- Automatic platform detection and built-in error handling

Benefits:
- 50% reduction in boilerplate code
- Consistent pattern with java-spring-ci.yml
- More maintainable and reliable tunnel management

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Add BrowserStack GitHub Actions setup-env to Android C++ and Java workflows
for cleaner credential management:
- Use setup-env action to configure BROWSERSTACK_USERNAME and BROWSERSTACK_ACCESS_KEY
- Replace all inline ${{ secrets.BROWSERSTACK_* }} with $BROWSERSTACK_* env vars
- Simplify curl commands and test execution steps

Benefits:
- Centralized credential configuration
- Cleaner, more maintainable code
- Consistent with Selenium workflows

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
…flows

Add BrowserStack GitHub Actions setup-env to 7 remaining Appium workflows
for cleaner credential management:

Workflows refactored:
- android-kotlin-ci.yml (Espresso tests)
- dotnet-maui-ci.yml (Android + iOS Appium tests)
- flutter-ci.yml (Android + iOS Flutter integration tests)
- kotlin-multiplatform-ci.yml (Espresso tests)
- react-native-ci.yml (Android + iOS Maestro tests)
- react-native-expo-ci.yml (Android + iOS Maestro tests)
- swift-ci.yml (iOS XCUITest)

Changes:
- Use setup-env action to configure BROWSERSTACK_USERNAME and BROWSERSTACK_ACCESS_KEY
- Replace all inline ${{ secrets.BROWSERSTACK_* }} with $BROWSERSTACK_* env vars
- Remove CREDS variable declarations where they existed
- Simplify curl commands for upload, execution, and monitoring steps

Benefits:
- Centralized credential configuration across all BrowserStack workflows
- Cleaner, more maintainable code
- Consistent with Selenium workflows (java-spring-ci, javascript-web-ci)
- Official BrowserStack GitHub Actions best practices

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Update all BrowserStack project names from "Ditto <SDK>" to "QuickStart <SDK>"
for consistency and clarity:

- QuickStart Android C++
- QuickStart Android Java
- QuickStart Android Kotlin
- QuickStart .NET MAUI
- QuickStart Flutter
- QuickStart Kotlin Multiplatform
- QuickStart React Native
- QuickStart React Native Expo
- QuickStart Swift
- QuickStart JavaScript Web
- QuickStart Java Spring

"Ditto" is redundant since these are official Ditto SDK quickstart projects.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Ensure project names in BrowserStack API JSON payloads match the
project-name set in setup-env action:
- android-java-ci.yml: "QuickStart Android Java"
- react-native-ci.yml: "QuickStart React Native"
- react-native-expo-ci.yml: "QuickStart React Native Expo"

Consistency ensures proper grouping in BrowserStack dashboard.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@teodorciuraru teodorciuraru changed the base branch from teodorciuraru/extract-seed-document-composite-action to main October 3, 2025 09:01
teodorciuraru and others added 5 commits October 3, 2025 12:01
- Rename all browserstack jobs to 'browserstack' or 'browserstack-{platform}'
- Rename 'report-results' and 'build-summary' to 'summary' for consistency
- Update all job dependencies and needs references
Remove `branches:` restrictions from workflow triggers to support stacked PRs.
Path-based filtering (`paths:`) already ensures CI only runs on relevant changes,
and concurrency groups prevent wasteful parallel runs.

This allows CI to run on:
- PRs targeting any branch (including stacked PRs)
- Pushes to any branch with relevant changes

Updated workflows:
- android-cpp-ci.yml
- android-java-ci.yml
- android-kotlin-ci.yml
- dotnet-maui-ci.yml
- flutter-ci.yml
- java-spring-ci.yml
- javascript-web-ci.yml
- kotlin-multiplatform-ci.yml
- react-native-ci.yml
- react-native-expo-ci.yml
- swift-ci.yml

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@teodorciuraru teodorciuraru changed the base branch from main to teodorciuraru/extract-seed-document-composite-action October 3, 2025 09:46
Change from 'Build #N' to 'CI Build #N' for consistency with all other workflows.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@teodorciuraru teodorciuraru added the enhancement New feature or request label Oct 3, 2025
@teodorciuraru teodorciuraru marked this pull request as ready for review October 3, 2025 14:42
@teodorciuraru teodorciuraru requested review from a team, busec0 and phatblat as code owners October 3, 2025 14:42
@teodorciuraru
Copy link
Contributor Author

Closing this PR to split into smaller, more focused changes. The BrowserStack GitHub Actions integration will be revisited separately.

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants