Skip to content

Conversation

@brandonpage
Copy link
Contributor

@brandonpage brandonpage commented Jan 29, 2025

After extensive testing I recreated the resulting configuration in a clean branch for this PR. The new CI won't run on this PR because it needs to be checked into dev but it works very similarly to our iOS implementation and the permission check was copied over exactly.

Example of the test results on the action summary screen:
Screenshot 2025-01-28 at 11 02 18 PM

Failures are also in-line annotations on the PR 😎

on:
workflow_dispatch:
schedule:
- cron: "0 5 * * 2,6" # cron is UTC, this translates to 10 PM PST Mon and Fri.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We used to run different API levels on different days of the week but it's a lot more efficient to just run all of them (in parallel on Firebase Test Lab) a couple times a week.

Comment on lines +72 to +73
DEFAULT_API_VERSION="34"
FULL_API_RANGE="28 29 30 31 32 33 34 35"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This (along with the Java and Ruby versions above) are why we really need YAML Anchors. If/when they finally add it we can move this to the top where it can be more easily found and updated when necessary.

Comment on lines +85 to +97
COMMAND="gcloud firebase test android run "
COMMAND+="--project mobile-apps-firebase-test "
COMMAND+="--type instrumentation "
COMMAND+="--app \"native/NativeSampleApps/RestExplorer/build/outputs/apk/debug/RestExplorer-debug.apk\" "
COMMAND+="--test=libs/${{ inputs.lib }}/build/outputs/apk/androidTest/debug/${{ inputs.lib }}-debug-androidTest.apk "
COMMAND+="${DEVICES}"
COMMAND+="--environment-variables coverage=true,coverageFile=\"/sdcard/coverage.ec\" "
COMMAND+="--directories-to-pull=/sdcard "
COMMAND+="--results-dir=${{ inputs.lib }}-${{github.run_number}} "
COMMAND+="--results-history-name=${{ inputs.lib }} "
COMMAND+="--timeout=20m --no-auto-google-login --no-record-video --no-performance-metrics --num-flaky-test-attempts=1"

eval "$COMMAND"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't love this implementation, but with the above section to add a single device for PRs and a device per API level for nightly runs I am not sure what else I can do. It's still pretty readable so I'd rather not break it out into yet another ruby or JS script.

Copy link
Contributor

@wmathurin wmathurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@brandonpage brandonpage merged commit a2a7972 into forcedotcom:dev Jan 30, 2025
1 of 2 checks passed
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.

5 participants