Use BrowserStack to run macOS CI tests#7836
Merged
Conversation
4e9d84e to
bd85af1
Compare
dzianis-dashkevich
previously approved these changes
May 5, 2026
bd85af1 to
1d1ad99
Compare
55a2a89 to
93e3773
Compare
tjenkinson
reviewed
May 5, 2026
| - name: start SauceConnect tunnel | ||
| uses: saucelabs/sauce-connect-action@0ca0e6ce3a5513d6bec2a54044a536c3da3a53fb # v2 | ||
| - name: setup BrowserStack env | ||
| uses: browserstack/github-actions/setup-env@master |
Member
There was a problem hiding this comment.
Would be good to pin to the current commit hash in case the browser stack repo gets compromised later
| access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} | ||
|
|
||
| - name: start BrowserStack Local | ||
| uses: browserstack/github-actions/setup-local@master |
…ng requests or failing with software aes
5ca63a1 to
c7f3433
Compare
tjenkinson
approved these changes
May 8, 2026
|
|
||
| test_functional_optional: | ||
| needs: test_functional_required | ||
| needs: [config, test_functional_required] |
Member
There was a problem hiding this comment.
This won't run if there's no sauce access. But if there's always neither or both this should be fine
There was a problem hiding this comment.
Pull request overview
This PR switches the “optional” macOS functional CI coverage from Sauce Labs to BrowserStack to mitigate Sauce connectivity issues impacting macOS runs.
Changes:
- Add BrowserStack support (including BrowserStack Local) to the functional test runner.
- Update CI workflow to run the optional macOS functional matrix on BrowserStack instead of Sauce Labs.
- Add BrowserStack test scripts/dependency and skip a couple of known-problematic streams on Safari.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
tests/test-streams.js |
Skip specific streams on Safari in functional runs. |
tests/functional/auto/setup.js |
Add BrowserStack + BrowserStack Local support and unify “remote” handling. |
package.json |
Add BrowserStack functional test scripts and browserstack-local dev dependency. |
package-lock.json |
Lockfile updates for browserstack-local and transitive deps. |
.github/workflows/build.yml |
Gate optional functional runs on BrowserStack credentials and switch macOS matrix to BrowserStack Local. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+819
to
+839
| if (failed && useBrowserStack) { | ||
| browser.executeScript( | ||
| 'browserstack_executor: {"action": "setSessionStatus", "arguments": {"status": "failed", "reason": "Test failed"}}' | ||
| ); | ||
| } else if (failed && useSauce) { | ||
| browser.executeScript('sauce:job-result=failed'); | ||
| } | ||
| } | ||
| }); | ||
|
|
||
| after(async function () { | ||
| if (useSauce && this.currentTest && this.currentTest.parent) { | ||
| if (this.currentTest && this.currentTest.parent) { | ||
| const tests = this.currentTest.parent.tests; | ||
| if (tests && tests.length && tests.every((test) => test.isPassed())) { | ||
| browser.executeScript('sauce:job-result=passed'); | ||
| if (useBrowserStack) { | ||
| browser.executeScript( | ||
| 'browserstack_executor: {"action": "setSessionStatus", "arguments": {"status": "passed"}}' | ||
| ); | ||
| } else if (useSauce) { | ||
| browser.executeScript('sauce:job-result=passed'); | ||
| } |
Member
There was a problem hiding this comment.
Ah yes we should await actually
| test_functional_optional: | ||
| needs: test_functional_required | ||
| needs: [config, test_functional_required] | ||
| if: needs.config.outputs.canUseBrowserStack == 'true' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR will...
Use BrowserStack to run macOS CI tests
Why is this Pull Request needed?
Saucelabs tests running on macOS have been struggling to complete because of connectivity issues (request status 0).