[NO QA] Add upload steps for Android and iOS to BrowserStack Automate#94370
[NO QA] Add upload steps for Android and iOS to BrowserStack Automate#94370isagoico wants to merge 1 commit into
Conversation
Added commands to upload builds to BrowserStack Automate
|
@thesahindia Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
I think the test steps for this will be something like:
If it fails, we should be able to check the GH action logs. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d1b7f24aac
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
|
||
| - name: Upload Android build to BrowserStack Automate | ||
| if: ${{ fromJSON(env.IS_APP_REPO) }} | ||
| run: curl -u "$BROWSERSTACK_AUTOMATE" -X POST "https://api-cloud.browserstack.com/app-automate/upload" -F "file=@${{ steps.find-apk.outputs.APK_PATH }}" |
There was a problem hiding this comment.
Make Automate uploads fail on HTTP errors
When BrowserStack rejects the Automate upload (for example due to missing/invalid credentials, an unsupported file, or another 4xx/5xx response), this step still exits successfully because curl only treats HTTP errors as failures when --fail/--fail-with-body is set (curl --help all: --fail-with-body Fail on HTTP errors but save the body). That lets staging deploys show the Android/iOS BrowserStack upload jobs as green even though no App Automate build was created; please add --fail-with-body or explicitly validate the response for the new Automate upload commands.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
This seems like something we should address
There was a problem hiding this comment.
This is actually the same logic we have for the previous step, so it seems fine to leave as is.
There was a problem hiding this comment.
I think we want the browserstack upload to be non-blocking
|
@luacmartins @tgolen with Carlos review (thank you so much), are we good to merge the PR? |
|
I asked @roryabraham to review as well since he's built most of these workflows. |
| if: ${{ fromJSON(env.IS_APP_REPO) }} | ||
| run: curl -u "$BROWSERSTACK_AUTOMATE" -X POST "https://api-cloud.browserstack.com/app-automate/upload" -F "file=@${{ steps.find-apk.outputs.APK_PATH }}" | ||
| env: | ||
| BROWSERSTACK_AUTOMATE: ${{ secrets.BROWSERSTACK_AUTOMATE }} |
There was a problem hiding this comment.
Did someone from ring0 actually provision this repo secret?
There was a problem hiding this comment.
No, I was able to create this one with my GH account. I extracted the browserStack key from the Applause service account.
There was a problem hiding this comment.
In order for ${{ secrets.BROWSERSTACK_AUTOMATE }} to expand to the token you want it to, it needs to be saved in the Expensify/App repo or Expensify org. Only ring0 has the access needed to do that. We should create an issue and label it ring0 to do that. You’ll then need to encrypt the secret and send it to the ring0 assignee over slack. I can help you if needed :)
|
@Julesssss @roryabraham @luacmartins Hello all. Apologies for my lack of activity here. After the earthquake in Venezuela these 2 weeks have been intense and my brain is not at it's full capacity. |
|
@isagoico we need the |
|
more precise next steps here: https://expensify.slack.com/archives/C9YU7BX5M/p1783628302348739 |
|
Superseded by #96100 |
Added commands to upload builds to BrowserStack Automate
Explanation of Change
Fixed Issues
$ #94368
PROPOSAL:
Tests
Offline tests
NO QA
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
NO QA
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)Avatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari