Remove legacy E2E test workflow and add new Android-specific workflow… #1
This file contains 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
# .github/workflows/e2e-android.yml | |
name: E2E New | |
on: push | |
jobs: | |
e2e-android: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Free Disk Space (Ubuntu) | |
uses: jlumbroso/free-disk-space@main | |
with: | |
tool-cache: true | |
android: false | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
cache: gradle | |
distribution: zulu | |
java-version: 17 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
with: | |
gradle-version: wrapper | |
cache-read-only: false | |
- name: Example App Yarn install | |
run: | | |
cd example | |
yarn install | |
cd .. | |
- name: Cache Detox build | |
id: cache-detox-build | |
uses: actions/cache@v4 | |
with: | |
path: example/android/app/build | |
key: ${{ runner.os }}-detox-build | |
restore-keys: | | |
${{ runner.os }}-detox-build | |
- name: Detox build | |
env: | |
ITBL_API_KEY: ${{secrets.ITERABLE_API_KEY}} | |
ITBL_ID: ${{secrets.ITBL_ID}} | |
run: | | |
cd example | |
yarn detox build --configuration android.emu.release | |
cd .. | |
- name: Get device name | |
id: device | |
run: node -e "console.log('AVD_NAME=' + require('./example/.detoxrc').devices.emulator.device.avdName)" >> $GITHUB_OUTPUT | |
- name: Detox test | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: 31 | |
arch: x86_64 | |
avd-name: ${{ steps.device.outputs.AVD_NAME }} | |
script: | | |
cd example | |
yarn detox test --configuration android.emu.release --headless --record-logs all | |
cd .. | |
- name: Upload artifacts | |
if: failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: detox-artifacts | |
path: example/artifacts |