Last active
January 13, 2026 12:58
-
-
Save vinitraj10/424561861419fe6e986b9f2cd070a860 to your computer and use it in GitHub Desktop.
CircleCI config to run maestro for iOS and Android
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
| version: 2.1 | |
| orbs: | |
| android: circleci/android@3.1.0 | |
| commands: | |
| install_node_modules: | |
| steps: | |
| - run: | |
| name: Install Node Modules | |
| command: yarn | |
| install_maestro_cli: | |
| steps: | |
| - run: | |
| name: Install Maestro CLI | |
| command: | | |
| curl -Ls "https://get.maestro.mobile.dev" | bash | |
| echo 'export PATH="$HOME/.maestro/bin:$PATH"' >> $BASH_ENV | |
| source $BASH_ENV | |
| install_gems: | |
| steps: | |
| - run: | |
| name: Install Gems | |
| command: | | |
| rbenv install | |
| gem install bundler:2.5.3 | |
| bundle install | |
| run-maestro-tests: | |
| description: Run Maestro Tests | |
| parameters: | |
| platform: | |
| type: enum | |
| enum: | |
| - android | |
| - ios | |
| description: Platform to run the tests for | |
| maestro_file: | |
| type: string | |
| description: Path to the Maestro test file | |
| steps: | |
| - run: | |
| name: Run Maestro Tests for << parameters.platform >> | |
| command: | | |
| maestro test << parameters.maestro_file >> | |
| MAESTRO_STATUS=$? | |
| if [ "$MAESTRO_STATUS" -eq 0 ]; then | |
| echo "✅ Tests Passed" | |
| else | |
| echo "❌ Tests Failed" | |
| fi | |
| jobs: | |
| run_maestro_ios: | |
| macos: | |
| xcode: 16.0.0 | |
| resource_class: m2pro.medium | |
| working_directory: ~/project | |
| steps: | |
| - node/install: | |
| node-version: 20.10.0 | |
| - checkout | |
| - install_node_modules | |
| - install_gems | |
| - run: | |
| name: Install Pods | |
| command: | | |
| cd ios | |
| bundle install | |
| bundle exec pod install | |
| - install_maestro_cli | |
| - run: | |
| name: Boot iPhone Simulator | |
| command: | | |
| xcrun simctl boot "iPhone 15" | |
| xcrun simctl list devices booted | |
| - run: | |
| name: Build iOS App for Simulator | |
| command: | | |
| cd ios | |
| xcodebuild clean build \ | |
| -workspace MyApp.xcworkspace \ | |
| -scheme MyApp-Dev \ | |
| -configuration Release \ | |
| -sdk iphonesimulator \ | |
| -derivedDataPath ./build | |
| - store_artifacts: | |
| path: ./ios/build/Build/Products/Release-iphonesimulator/MyApp-Dev.app | |
| - run: | |
| name: Install App on Simulator | |
| command: > | |
| xcrun simctl install booted | |
| ./ios/build/Build/Products/Release-iphonesimulator/MyApp-Dev.app | |
| - run-maestro-tests: | |
| platform: ios | |
| maestro_file: e2e/main.yml | |
| run_maestro_android: | |
| docker: | |
| - image: 'circleci/android:2023.01.2' | |
| resource_class: xlarge | |
| working_directory: ~/project | |
| steps: | |
| - checkout | |
| - install_node_modules | |
| - install_gems | |
| - run: | |
| name: Build Android App | |
| command: | | |
| cd android | |
| ./gradlew assembleDevRelease --no-daemon --console=plain | |
| - store_artifacts: | |
| path: ./android/app/build/outputs/apk/dev/release/app-dev-release.apk | |
| - run-maestro-tests: | |
| platform: android | |
| maestro_file: e2e/main.yml | |
| workflows: | |
| version: 2 | |
| maestro_tests: | |
| triggers: | |
| - schedule: | |
| cron: 0 0 * * * | |
| filters: | |
| branches: | |
| only: | |
| - main | |
| jobs: | |
| - run_maestro_ios | |
| - run_maestro_android |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment