-
Hi! I'm trying to set up a github action on my project in order to launch integration tests to be sent to firebase. Locally, the process works smoothly, the generated zip is sent to firebase and the test passes.
Here is the action: name: Integration tests
on:
push:
branches:
- screenshot-test
pull_request:
branches: [ main ]
jobs:
integration-tests:
runs-on: macos-latest
steps:
- name: Get Repository
uses: actions/checkout@v3
- name: Setup Flutter SDK
uses: subosito/flutter-action@v2
with:
channel: 'stable'
architecture: x64
- name: Run Flutter Pub Get
run: flutter pub get
- name: Google Cloud Auth
uses: 'google-github-actions/auth@v0'
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'
- name: Setup Google Cloud SDK
uses: google-github-actions/setup-gcloud@v1.1.1
- name: Install Patrol cli
run: 'dart pub global activate patrol_cli'
- name: Run iOS Integration tests
run: './integration_ios.sh' the output="../build/ios_integ"
product="build/ios_integ/Build/Products"
dev_target="15.7"
patrol build ios --target integration_test/example_test.dart --release --verbose
pushd $product
mv "Runner_iphoneos16.4-arm64.xctestrun" "Runner_iphoneos$dev_target-arm64.xctestrun"
zip -r "ios_tests.zip" "Release-iphoneos" "Runner_iphoneos$dev_target-arm64.xctestrun"
popd
gcloud firebase test ios run --test "build/ios_integ/Build/Products/ios_tests.zip" \
--device model=iphone13pro,version=$dev_target,locale=en_US,orientation=portrait \
--xcode-version=14.3 \
--timeout 3m \
--results-bucket=gs://xxxxxx.appspot.com \
--results-dir=tests/firebase |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
In the docs they don't recommend using GitHub actions for this purpose, they work much better for running unit tests, try Firebase Test Lab or Circle CI or any number of the CI/CD offerings, hope this helps unless you absolutely NEED to use GH actions for any particular reason. |
Beta Was this translation helpful? Give feedback.
-
That's correct. You need to do it manually or use a tool like fastlane's |
Beta Was this translation helpful? Give feedback.
-
I would also like to know how to correctly configure actions on github to run patrol tests. Here is my action: `name: Canhoto on: jobs:
`
Can someone help me? |
Beta Was this translation helpful? Give feedback.
It's okay to use GHA for integration tests but not for testing on Android emulators because of their poor performance on Github-hosted machines (there's a hope in GH-larger runners but they're still in beta, you can try to join their program here).
Right now we're testing emulatorwtf and for now it looks very well - we haven't seen flakiness in our tests. BTW @bertuz uses FTL in his workflow, it seems like the only problem is code signing.