-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
81 changed files
with
2,441 additions
and
1,856 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# this is a sample .env file. Copy it to .env, and edit the .env file to match your needs. | ||
|
||
export ANDROID_APK=/home/yougotthis/Downloads/session-android-universal.apk | ||
export SDK_MANAGER_FULL_PATH=/home/yougotthis/Android/Sdk/cmdline-tools/latest/bin/sdkmanager | ||
export AVD_MANAGER_FULL_PATH=/home/yougotthis/Android/Sdk/cmdline-tools/latest/bin/avdmanager | ||
export EMULATOR_FULL_PATH=/home/yougotthis/Android/Sdk/emulator/emulator | ||
export ANDROID_SYSTEM_IMAGE="system-images;android-35;google_atd;x86_64" | ||
export IOS_APP_PATH_PREFIX=just_not_empty | ||
export IOS_FIRST_SIMULATOR=just_not_empty | ||
export IOS_SECOND_SIMULATOR=just_not_empty | ||
export IOS_THIRD_SIMULATOR=just_not_empty | ||
export IOS_FOURTH_SIMULATOR=just_not_empty | ||
export IOS_FIFTH_SIMULATOR=just_not_empty | ||
export IOS_SIXTH_SIMULATOR=just_not_empty | ||
export IOS_SEVENTH_SIMULATOR=just_not_empty | ||
export IOS_EIGHTH_SIMULATOR=just_not_empty |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,199 @@ | ||
name: Run android regression tests | ||
name: Android regression tests | ||
run-name: '${{ inputs.RISK }} regressions on: ${{ inputs.BRANCH_TO_CHECKOUT }} (${{ inputs.APPIUM_REPO }})' | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tags: | ||
description: "APK.tar.gz url to test" | ||
APK_URL: | ||
description: 'APK.tar.gz url to test' | ||
required: true | ||
type: string | ||
# push: | ||
# branches: | ||
# - test-docker-container | ||
default: https://oxen.rocks/session-foundation/session-android/release/1.20.3/session-android-20241101T052421Z-be16d3bf9-universal.tar.xz | ||
|
||
RISK: | ||
description: 'risks to target' | ||
required: false | ||
type: choice | ||
options: | ||
- 'high-risk' | ||
- 'medium-risk' | ||
- 'low-risk' | ||
- '' | ||
|
||
APPIUM_REPO: | ||
description: 'appium repo to checkout' | ||
required: true | ||
type: choice | ||
options: | ||
- session-foundation/session-appium | ||
- burtonemily/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 | ||
type: choice | ||
options: | ||
- '0' | ||
- '1' | ||
- '2' | ||
default: '0' | ||
|
||
PRINT_FAILED_TEST_LOGS: | ||
description: 'print failed test logs (1 to enable)' | ||
required: true | ||
type: choice | ||
options: | ||
- '0' | ||
- '1' | ||
default: '0' | ||
PRINT_ONGOING_TEST_LOGS: | ||
description: 'print ongoing test logs (1 to enable)' | ||
required: true | ||
type: choice | ||
options: | ||
- '0' | ||
- '1' | ||
default: '0' | ||
|
||
# concurrency: | ||
# group: ${{ github.workflow }} | ||
# cancel-in-progress: true | ||
|
||
jobs: | ||
android-regression: | ||
runs-on: [self-hosted, linux, x64, qa-android] | ||
runs-on: [self-hosted, linux, X64, qa-android] | ||
env: | ||
ANDROID_APK: '../extracted/session-android.apk' | ||
APPIUM_ADB_FULL_PATH: '/opt/android/platform-tools/adb' | ||
ANDROID_SDK_ROOT: '/opt/android' | ||
PLAYWRIGHT_WORKERS_COUNT: 1 | ||
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_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' | ||
|
||
# echo "SHARD_NUMBER ${{ github.event.inputs.SHARD_NUMBER }}" | ||
# echo "SHARD_COUNT ${{ github.event.inputs.SHARD_COUNT }}" | ||
|
||
steps: | ||
- name: run tests in already running container | ||
run: docker exec $(docker ps -q) sh -c "dl_and_test" | ||
- uses: actions/checkout@v4 | ||
- 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 }}" | ||
- name: Download APK | ||
run: | | ||
wget -q -O session-android.apk.tar.xz ${{ github.event.inputs.APK_URL }} | ||
ls | ||
pwd | ||
- name: Extract APK | ||
run: | | ||
tar xf session-android.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: ${{ github.event.inputs.APPIUM_REPO }} | ||
ref: ${{ github.event.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: Restart adb server | ||
shell: bash | ||
continue-on-error: true # just so we don't fail if adb wasn't alreadu running | ||
run: | | ||
source ./scripts/ci.sh | ||
adb kill-server; | ||
adb start-server; | ||
- name: Start 4 android emulators with snapshots | ||
shell: bash | ||
run: | | ||
source ./scripts/ci.sh | ||
start_with_snapshots | ||
- name: List all tests | ||
run: | | ||
cd forked-session-appium | ||
pwd | ||
npx playwright test --list | ||
- name: Run the Android tests # ${{ github.event.inputs.SHARD_NUMBER }}/${{ github.event.inputs.SHARD_COUNT }} | ||
run: | | ||
cd forked-session-appium | ||
pwd | ||
yarn test 'android @${{ github.event.inputs.RISK }}' | ||
- name: Killall running emulators | ||
if: always() | ||
continue-on-error: true # just so we don't fail | ||
shell: bash | ||
run: | | ||
source ./scripts/ci.sh | ||
killall_emulators |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Session Appium Build | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- dev | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- run: git config --global core.autocrlf false | ||
|
||
- name: Checkout git repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
|
||
- uses: actions/cache/restore@v4 | ||
id: cache-appium-modules | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('package.json', 'yarn.lock', 'patches/**') }} | ||
|
||
- name: Install dependencies | ||
shell: bash | ||
if: steps.cache-appium-modules.outputs.cache-hit != 'true' | ||
run: yarn install --immutable | ||
|
||
- uses: actions/cache/save@v4 | ||
id: cache-appium-modules-save | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('package.json', 'yarn.lock', 'patches/**') }} | ||
|
||
- name: Generate and concat files | ||
shell: bash | ||
run: yarn tsc | ||
|
||
- name: Lint Files | ||
run: yarn lint-check |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@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RSNtEMX2yyq9b5Nyn7BrDTaSTa3fGXY//qXMOOOZArYvrDmu8MwsiW5jUrca | ||
C6n2qTRCHKQ1DbWhy2etx7+zAzL8V1e0S18Rf8ESw63SgxkYIlQs6WwhZKLhpMYH | ||
wAZ9mIjHtwKBgQDpmGfdUeHnty4HFgCrc2V8xHTNkX7LwH0xDFaMkq2DN1RGXIVh | ||
AuGcfmUXdb8nbxpyjYO+cFSS15XmOz1C9PRJ40sgRutrrTU4fFl6LNRgbfOcj6yc | ||
gr3OTW7Hbk4gN0m4TVtTxDYHomQE0VlJJxeRcL3RPKYliACcWrBxDPWHwQKBgGPZ | ||
5ITHHccbC7unRP3SwOGK9EY1J9haCarBR9UYRDn1vJ5l/ZH+v/AGmjTig3agqwZ9 | ||
hzMwaiSXwlDdlk62BHBvUe/HLyfZ8JB7VIPCIvzBSmJnK6V21iMwDKGG6kjonRvo | ||
oiWtukEf0idsU7kkQBrOHnFeQK325tkzX5lZt0LnAoGBAN+ZocRrObAYtaZ9AB5h | ||
imN+fX2tm07UbkHiIlADlVINI9X26PkzkZHUzuAoniWh+ScxBlLzA80IR8BfbK5Y | ||
Lq6oiVq7P627938L4hQV6z0OyijV+xkz5zJG61KClbd6dUJXS0fx4ZxuD5EP8y0D | ||
M/SZ1KBz7Vg/LLeSpdVbqDnM | ||
-----END PRIVATE KEY----- |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
QAAAAEGDuHc/88ExFvxDyBZI3TwcsOLyFkJpAXID3J9Sl8IC5beuIeWuRoYHC30HMMfQpHzU1MPJePlP/xFZXtmN+9YDLdxRn7rz+9lBVcz5wwXWiJ9fbnYkvFGpL3gUBmGKOlZM/58pzy8xqhbdSlkviA8oKhAyDnBJdQ0pu4e5jdTqHIncXlzEFLn19rxTVtfp1yHpE99mp6eLOut3AvNvb/qmWmyFDnXkc/wezKFrSXEdCGkRCotLnOaWzFXO4kIi2YcQgdCGWaxsm5whzBrOUI0FQFx9v0mXW2YjDcpJk9sQkQqEevKEiNhzo2H4rkm1DuwTQCfYThoU5kQ6b6YHGAGT/r7G4qMNYnPnzAoCHKvL7n1oNNGqrbRETN3blNtQfjzzoCAZMIE+1gAK9BMaJu2gdsn8py1Ri8wejmcwL6/1eXtjrEVXByMQh8Tv4WcgMkQQzdjkafuwOxZaLVvlCqZvSgPpCpBKPgnvRSTlQJt185/k0D+lBocKUZNQ84QDLfQhV+0+uBssaUGc9lNcXDtHC1DvhmR9gThAAJqvazHMoskprLoLqySWqAgVJs3x/bsWJhy8Cnslfx5nGk3EG3wpVrjuc9lwauFEHef/5x1M4+Ofag+iVIqoscjMKNq8TIXl0APfgm6c4CF41poUhQccfAJ2tOaSm7txfnpRiUBh4wzoHAEAAQA= @buildkitsandbox | ||
|
Oops, something went wrong.