Skip to content

Fix actions/upload-artifact #5

Fix actions/upload-artifact

Fix actions/upload-artifact #5

name: Android E2E (BuildJet AMD64)
on: [push, pull_request]
jobs:
run_android_e2e:
timeout-minutes: 10
runs-on: buildjet-2vcpu-ubuntu-2204 # See: https://buildjet.com/for-github-actions/docs/getting-started/run-your-first-workflow
strategy:
fail-fast: false
max-parallel: 5
matrix:
arch: [x86, x86_64]
# ^^^ `runs-on: buildjet-2vcpu-ubuntu-2204` doesn't support `arm64-v8a`
api-level: [26, 27, 28, 29, 30, 31, 32, 33, 34]
# ^^^ `21` is the minimum API level supported by React Native
# [21, 22, 23, 24, 25,] - didn't work with Maestro
target: [default, google_apis, google_apis_playstore]
exclude:
# Exclude combinations that are not supported by the Android SDK
# Print all available Android emulators: `sdkmanager --list --verbose | grep system-images`
# x85
- arch: x86
api-level: 31
- arch: x86
api-level: 32
- arch: x86
api-level: 33
- arch: x86
api-level: 34
# default
- target: default
api-level: 30
arch: x86
- target: default
api-level: 31
arch: x86
- target: default
api-level: 32
- target: default
api-level: 33
- target: default
api-level: 34
# google_apis
- target: google_apis
api-level: 27
arch: x86_64
# google_apis_playstore
- target: google_apis_playstore
api-level: 21
- target: google_apis_playstore
api-level: 22
- target: google_apis_playstore
api-level: 23
- target: google_apis_playstore
api-level: 24
arch: x86_64
- target: google_apis_playstore
api-level: 25
arch: x86_64
- target: google_apis_playstore
api-level: 26
arch: x86_64
- target: google_apis_playstore
api-level: 27
arch: x86_64
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- run: npx envinfo
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
- name: Install Maestro
run: MAESTRO_VERSION=1.30.4 curl -Ls 'https://get.maestro.mobile.dev' | bash
- name: Run Maestro E2E tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
target: ${{ matrix.target }}
arch: ${{ matrix.arch }}
cores: 2
ram-size: 2048M
force-avd-creation: false
emulator-boot-timeout: 600 # 10min
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
pre-emulator-launch-script: |
echo "Running pre emulator launch script. Printing the working directory now:"
pwd
script: |
npx envinfo # check memory usage
adb devices
adb install app-release.apk
# Run e2e
./run_android_e2e.sh
# ^^^ Will debug files: report*.xml, video_record.mp4, last_img.png
- name: Upload report
if: always()
uses: actions/upload-artifact@v3
with:
name: e2e-report-${{ matrix.api-level }}-${{ matrix.arch }}-${{ matrix.target }}
path: |
${{ github.workspace }}/*.mp4
${{ github.workspace }}/*.png
${{ github.workspace }}/report*.xml
- name: Upload debug logs
if: always()
uses: actions/upload-artifact@v3
with:
name: e2e-debug-logs-${{ matrix.api-level }}-${{ matrix.arch }}-${{ matrix.target }}
path: ~/.maestro/tests/**/*