Build Android QA App for Maestro #243
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
| name: Build Android QA App for Maestro | |
| on: | |
| schedule: | |
| - cron: "0 6 * * *" # Runs daily at 6:00 AM UTC | |
| workflow_dispatch: # Allows manual trigger | |
| jobs: | |
| build-android-qa: | |
| if: github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Free Disk Space | |
| uses: ./.github/actions/free-disk-space-android | |
| - name: Set up Java 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: "zulu" | |
| java-version: "17" | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: "3.1.7" | |
| bundler-cache: true | |
| - name: Install Ruby dependencies | |
| run: bundle install | |
| - name: Install ninja | |
| run: sudo apt-get update && sudo apt-get install ninja-build | |
| - name: Setup node.js | |
| uses: ./.github/actions/setup-node | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: us-east-1 | |
| - name: Set up environment for CI | |
| run: | | |
| touch .env.shared && touch keys.shared.json | |
| scripts/setup/setup-env-for-ci | |
| echo "Environment setup completed" | |
| - name: Cache node modules | |
| id: cache-node-modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: .yarn/cache | |
| key: yarn-v4-${{ runner.os }}-${{ hashFiles('yarn.lock') }} | |
| restore-keys: | | |
| yarn-v4-${{ runner.os }}- | |
| - name: Install Node.js dependencies | |
| run: yarn install --immutable | |
| - name: Cache Gradle dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| android/.gradle | |
| key: gradle-v2-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| restore-keys: | | |
| gradle-v2-${{ runner.os }}- | |
| - name: Download fonts from s3 | |
| run: ./scripts/setup/download-fonts | |
| - name: Download android assets | |
| run: ./scripts/setup/download-assets-android | |
| - name: Run relay compiler | |
| run: yarn relay | |
| - name: Build Android app and upload to S3 for Maestro | |
| run: bundle exec fastlane build_maestro_android | |
| env: | |
| VERBOSE: 1 | |
| ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} | |
| ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }} |