Skip to content

refactor: add gradle parameter required for gradle managed device #25

refactor: add gradle parameter required for gradle managed device

refactor: add gradle parameter required for gradle managed device #25

name: Android Build & Deploy (Beta)
on:
pull_request:
types:
- closed
branches: [ "dev" ]
jobs:
deploy:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up ruby env
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.2
bundler-cache: true
- name: Initialize local properties
env:
MAPS_API_KEY: ${{ secrets.MAPS_API_KEY }}
CMS_API_KEY: ${{ secrets.CMS_API_KEY }}
run: echo MAPS_API_KEY="$MAPS_API_KEY" >> ./local.properties ; echo CMS_API_KEY="$CMS_API_KEY" >> ./local.properties
# Set up your GitHub Actions workflow with a specific version of Java
- name: Setup Java JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Run tests
run: bundle exec fastlane android test
- name: Decode Service Account Key JSON File
uses: timheuer/base64-to-file@v1
id: service_account_json_file
with:
fileName: "serviceAccount.json"
encodedString: ${{ secrets.PLAY_STORE_CREDENTIALS }}
- name: Decode Keystore File
uses: timheuer/base64-to-file@v1
id: android_keystore
with:
fileName: "android_keystore.keystore"
encodedString: ${{ secrets.KEYSTORE }}
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup GMD
run: ./gradlew :benchmarks:pixel6Api35Setup
--info
-Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
- name: Generate baseline profile
run: ./gradlew :app:generateBaselineProfile
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
-Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true
-Pandroid.experimental.androidTest.numManagedDeviceShards=1
-Pandroid.experimental.testOptions.managedDevices.maxConcurrentDevices=1
-Pandroid.experimental.testOptions.managedDevices.setupTimeoutMinutes=5
- name: Build & deploy Android release
run: bundle exec fastlane android beta
env:
ANDROID_KEYSTORE_FILE: ${{ steps.android_keystore.outputs.filePath }}
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS}}
ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}
GOOGLE_PLAY_SERVICE_ACCOUNT_KEY: ${{ steps.service_account_json_file.outputs.filePath }}
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: assets
path: |
${{ github.workspace }}/app/build/outputs/bundle/release