fix: test gh runner #118
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
name: Run android regression tests | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
APK_URL: | ||
description: 'APK.tar.gz url to test' | ||
required: true | ||
type: string | ||
BRANCH_TO_CHECKOUT: | ||
description: 'bilb/session-appium branch to checkout' | ||
required: true | ||
type: string | ||
push: | ||
branches: | ||
- test-docker-container | ||
concurrency: | ||
group: ${{ github.workflow }} | ||
cancel-in-progress: true | ||
jobs: | ||
android-regression: | ||
runs-on: [self-hosted, linux, x64, qa-android] | ||
env: | ||
ANDROID_APP_PATH_PREFIX: "../extracted/session-android.apk" | ||
APPIUM_ADB_FULL_PATH: "/opt/android/platform-tools/adb" | ||
ANDROID_SDK_ROOT: "/opt/android" | ||
PLAYWRIGHT_WORKERS_COUNT: 1 | ||
IOS_APP_PATH_PREFIX: "just_not_empty" | ||
IOS_FIRST_SIMULATOR: "just_not_empty" | ||
IOS_SECOND_SIMULATOR: "just_not_empty" | ||
IOS_THIRD_SIMULATOR: "just_not_empty" | ||
IOS_FOURTH_SIMULATOR: "just_not_empty" | ||
IOS_FIFTH_SIMULATOR: "just_not_empty" | ||
IOS_SIXTH_SIMULATOR: "just_not_empty" | ||
IOS_SEVENTH_SIMULATOR: "just_not_empty" | ||
IOS_EIGHTH_SIMULATOR: "just_not_empty" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Runner Details | ||
run: | | ||
echo "BRANCH_TO_CHECKOUT ${inputs.BRANCH_TO_CHECKOUT}" | ||
echo "APK_URL ${inputs.APK_URL}" | ||
- name: Download APK | ||
run: | | ||
Check failure on line 49 in .github/workflows/android-regression.yml GitHub Actions / Run android regression testsInvalid workflow file
|
||
wget -q -O plop.apk.tar.xz ${{ inputs.APK_URL }} | ||
ls | ||
pwd | ||
- name: Extract APK | ||
run: | | ||
tar xf plop.apk.tar.xz | ||
ls | ||
pwd | ||
- name: Rename extracted folder | ||
run: | | ||
mv session-android-*universal extracted | ||
ls extracted | ||
mv extracted/*.apk extracted/session-android.apk | ||
ls extracted | ||
pwd | ||
- uses: actions/checkout@v4 | ||
with: | ||
repository: 'bilb/session-appium' | ||
ref: ${{ inputs.BRANCH_TO_CHECKOUT }} | ||
path: 'forked-session-appium' | ||
- uses: actions/setup-node@v4 | ||
with: | ||
# node-version-file: 'forked-session-appium/.nvmrc' | ||
node-version: 18.15.0 | ||
- name: Install yarn | ||
run: | | ||
npm install -g yarn | ||
corepack enable | ||
yarn set version 4.1.1 | ||
- name: Install test dependencies | ||
run: | | ||
cd forked-session-appium | ||
ls | ||
git status | ||
touch yarn.lock | ||
yarn install --immutable | ||
- name: Build the Android tests | ||
run: | | ||
cd forked-session-appium | ||
yarn tsc | ||
- name: Start 4 android emulators with snapshots | ||
shell: bash | ||
run: for i in {1..4}; do emulator @emulator$i -no-window -no-snapshot-save -snapshot plop.snapshot -force-snapshot-load & ; sleep 5; done | ||
- name: Run the Android tests | ||
run: | | ||
cd forked-session-appium | ||
pwd | ||
yarn test-android-shard 1/1 | ||
- name: Killall running emulators | ||
if: always() | ||
run: killall qemu-system-x86_64-headless | ||