Skip to content

WIP investigate Ci for iOS #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 27 additions & 84 deletions .github/workflows/android-regression.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Android regression tests
run-name: '${{ inputs.RISK }} regressions on: ${{ inputs.BRANCH_TO_CHECKOUT }} (${{ inputs.APPIUM_REPO }})'
run-name: 'Android regression with risk: "${{ inputs.RISK }}"'

on:
workflow_dispatch:
inputs:
APK_URL:
description: 'url to test'
description: 'apk (tar.xz) url to test'
required: true
type: string
default: https://oxen.rocks/session-foundation/session-android/release/1.20.3/session-android-20241101T052421Z-be16d3bf9-universal.tar.xz
Expand All @@ -20,45 +20,6 @@ on:
- 'low-risk'
- ''

APPIUM_REPO:
description: 'appium repo to checkout'
required: true
type: choice
options:
- session-foundation/session-appium
- burtonemily/session-appium
- Miki-Session/session-appium
- bilb/session-appium
default: session-foundation/session-appium

BRANCH_TO_CHECKOUT:
description: 'branch to checkout'
required: true
type: string
default: test-ci-regression

# SHARD_NUMBER:
# description: 'shard number'
# required: true
# type: choice
# options:
# - '1'
# - '2'
# - '3'
# - '4'
# default: '1'

# SHARD_COUNT:
# description: 'shard count'
# required: true
# type: choice
# options:
# - '1'
# - '2'
# - '3'
# - '4'
# default: '1'

PLAYWRIGHT_RETRIES_COUNT:
description: 'retries of failing tests to do at most'
required: true
Expand Down Expand Up @@ -93,43 +54,39 @@ on:
- '1'
default: '1'

# concurrency:
# group: ${{ github.workflow }}
# cancel-in-progress: true

jobs:
android-regression:
runs-on: [self-hosted, linux, X64, qa-android]
env:
IOS_APP_PATH_PREFIX: '../extracted/Session.app'
ANDROID_APK: '../extracted/session-android.apk'
IOS_APP_PATH_PREFIX: '<just_not_empty>'
ANDROID_APK: './extracted/session-android.apk'
APPIUM_ADB_FULL_PATH: '/opt/android/platform-tools/adb'
ANDROID_SDK_ROOT: '/opt/android'
PLAYWRIGHT_RETRIES_COUNT: ${{ github.event.inputs.PLAYWRIGHT_RETRIES_COUNT }}
PRINT_FAILED_TEST_LOGS: ${{ github.event.inputs.PRINT_FAILED_TEST_LOGS }}
PRINT_ONGOING_TEST_LOGS: ${{ github.event.inputs.PRINT_ONGOING_TEST_LOGS }}
IOS_FIRST_SIMULATOR: '49651A15-3E14-4BAF-8B8E-0C630C35B8DD'
IOS_SECOND_SIMULATOR: '7CA21E47-56AC-4B76-82A4-1D5199515F38'
IOS_THIRD_SIMULATOR: 'FE1DEDC7-D530-41E7-9B38-86ED2DDB97CD'
IOS_FOURTH_SIMULATOR: '561C621C-2CEF-4FCC-87B7-E6221718D15C'
IOS_FIFTH_SIMULATOR: '5AA87E03-5831-4209-87A0-21E5ECDC490F'
IOS_SIXTH_SIMULATOR: '6FB10AF3-3970-46BA-B414-1206AA4E726D'
IOS_SEVENTH_SIMULATOR: '0BDA36C0-83F4-46DF-ADC9-FF30E969D4BD'
IOS_EIGHTH_SIMULATOR: '1C61A0B6-3085-46B6-9B2E-6E9A1B594944'
IOS_NINTH_SIMULATOR: '7C69D129-BD40-4BC0-9A0D-6A7E990F23E8'
IOS_TENTH_SIMULATOR: '275E0C5B-2458-4490-831D-4CE86C8EC704'
IOS_ELEVENTH_SIMULATOR: 'EA5C5BCB-1E3E-4FFC-88BB-8D1DE354BC3B'
IOS_TWELFTH_SIMULATOR: '41514F87-DC49-4C81-B60C-03D1F8653A42'

# echo "SHARD_NUMBER ${{ github.event.inputs.SHARD_NUMBER }}"
# echo "SHARD_COUNT ${{ github.event.inputs.SHARD_COUNT }}"
PLAYWRIGHT_WORKERS_COUNT: ${{ github.event.inputs.PLAYWRIGHT_WORKERS_COUNT }}
PLAYWRIGHT_REPEAT_COUNT: 0
IOS_1_SIMULATOR: '<just_not_empty>'
IOS_2_SIMULATOR: '<just_not_empty>'
IOS_2_SIMULATOR: '<just_not_empty>'
IOS_4_SIMULATOR: '<just_not_empty>'
IOS_5_SIMULATOR: '<just_not_empty>'
IOS_6_SIMULATOR: '<just_not_empty>'
IOS_7_SIMULATOR: '<just_not_empty>'
IOS_8_SIMULATOR: '<just_not_empty>'
IOS_9_SIMULATOR: '<just_not_empty>'
IOS_10_SIMULATOR: '<just_not_empty>'
IOS_11_SIMULATOR: '<just_not_empty>'
IOS_12_SIMULATOR: '<just_not_empty>'

steps:
- uses: actions/checkout@v4
with:
lfs: true

- name: Runner Details
run: |
echo "BRANCH_TO_CHECKOUT ${{ github.event.inputs.BRANCH_TO_CHECKOUT }}"
echo "APPIUM_REPO ${{ github.event.inputs.APPIUM_REPO }}"
echo "APK_URL ${{ github.event.inputs.APK_URL }}"
echo "RISK ${{ github.event.inputs.RISK }}"

Expand All @@ -152,17 +109,9 @@ jobs:
ls extracted
pwd

- uses: actions/checkout@v4
with:
repository: ${{ github.event.inputs.APPIUM_REPO }}
ref: ${{ github.event.inputs.BRANCH_TO_CHECKOUT }}
path: 'forked-session-appium'
lfs: true

- uses: actions/setup-node@v4
with:
# node-version-file: 'forked-session-appium/.nvmrc'
node-version: 18.15.0
node-version-file: '.nvmrc'

- name: Install yarn
run: |
Expand All @@ -172,20 +121,16 @@ jobs:

- name: Install test dependencies
run: |
cd forked-session-appium
ls
git status
touch yarn.lock
yarn install --immutable

- name: Start Appium server
run: |
cd forked-session-appium
yarn "./node_modules/.bin/appium server --use-drivers=uiautomator2,xcuitest --port 8110 --allow-cors"
yarn start-appium-server

- name: Build the Android tests
- name: Build the tests
run: |
cd forked-session-appium
yarn tsc

- name: Restart adb server
Expand All @@ -204,15 +149,13 @@ jobs:

- name: List all tests
run: |
cd forked-session-appium
pwd
npx playwright test --list --grep "@${{ github.event.inputs.RISK }}"
yarn test "android @${{ github.event.inputs.RISK }}" --list

- name: Run the tests # ${{ github.event.inputs.SHARD_NUMBER }}​​/${{ github.event.inputs.SHARD_COUNT }}​​
- name: Run the tests
run: |
cd forked-session-appium
pwd
yarn test 'android "@${{ github.event.inputs.RISK }}"'
yarn test "android @${{ github.event.inputs.RISK }}"

- name: Kill all running emulators
if: always()
Expand Down
Loading
Loading