-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: clone and run wdio-android test (#54)
* Run E2E from flutter-finder repo https://github.com/AppiumTestDistribution/flutter-finder/tree/main
- Loading branch information
1 parent
5f8b024
commit eef6fd6
Showing
8 changed files
with
27,722 additions
and
30,729 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
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 |
---|---|---|
|
@@ -8,7 +8,7 @@ on: | |
|
||
name: Appium Flutter Integration Driver | ||
jobs: | ||
Build_Server: | ||
Android_E2E_WDIO: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
|
@@ -48,6 +48,18 @@ jobs: | |
run: | | ||
npm install | ||
npm run prettier-check | ||
- name: Build Driver | ||
run: | | ||
npm run build | ||
- name: Install Drivers | ||
run: | | ||
npm install -g appium | ||
appium driver list | ||
- name: Checkout Test from Flutter Finder | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: AppiumTestDistribution/flutter-finder | ||
path: finder | ||
- name: run tests | ||
uses: reactivecircus/android-emulator-runner@v2 | ||
with: | ||
|
@@ -59,19 +71,96 @@ jobs: | |
echo ${{ env }} | ||
adb devices | ||
node --version | ||
npm install -g wait-on | ||
npm install -g appium | ||
npm install | ||
npm run build | ||
echo ${{ github.workspace }} | ||
ls ${{ github.workspace }}/finder -R | ||
appium driver list | ||
mkdir ${{ github.workspace }}/appium-logs | ||
adb logcat > ${{ github.workspace }}/appium-logs/flutter.txt & | ||
echo $android_app | ||
APP_PATH=${{ env.APP_PATH }} npm run wdio-android | ||
APP_PATH=${{ env.APP_PATH }} npm run wdio-android-ci | ||
# appium server -pa=/wd/hub & wait-on http://127.0.0.1:4723/wd/hub/status && | ||
- name: upload appium logs | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: appium-logs | ||
path: ${{ github.workspace }}/appium-logs | ||
Android_E2E_JAVA: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
api-level: [ 29 ] | ||
target: [ google_apis ] | ||
steps: | ||
- name: Check out my other private repo | ||
uses: actions/checkout@master | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'adopt' | ||
- name: Setup Android SDK | ||
uses: android-actions/[email protected] | ||
|
||
- name: 'List files' | ||
run: | | ||
release_info=$(curl -s https://api.github.com/repos/AppiumTestDistribution/appium-flutter-server/releases/latest) | ||
asset_urls=$(echo "$release_info" | grep "browser_download_url" | cut -d '"' -f 4) | ||
android_app=$(echo "$asset_urls" | head -n 1) | ||
echo "$android_app" | ||
ios_app=$(echo "$asset_urls" | tail -n 1) | ||
echo "$ios_app" | ||
curl -LO $android_app | ||
ls ${{ github.workspace }} | ||
echo "APP_PATH=${{ github.workspace }}/app-debug.apk" >> $GITHUB_ENV | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- name: Enable KVM group perms | ||
run: | | ||
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | ||
sudo udevadm control --reload-rules | ||
sudo udevadm trigger --name-match=kvm | ||
- name: Linting | ||
run: | | ||
npm install | ||
npm run prettier-check | ||
- name: Build Driver | ||
run: | | ||
npm run build | ||
- name: Install Drivers | ||
run: | | ||
npm install -g appium | ||
appium driver list | ||
- name: Checkout Test from Flutter Finder | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: AppiumTestDistribution/flutter-finder | ||
path: finder | ||
- name: run tests | ||
uses: reactivecircus/android-emulator-runner@v2 | ||
with: | ||
working-directory: ${{ github.workspace }}/finder/flutter-by/java | ||
api-level: ${{ matrix.api-level }} | ||
target: ${{ matrix.target }} | ||
arch: x86_64 | ||
profile: Nexus 6 | ||
script: | | ||
echo ${{ env }} | ||
adb devices | ||
node --version | ||
echo ${{ github.workspace }} | ||
ls ${{ github.workspace }}/finder -R | ||
appium driver list | ||
mkdir ${{ github.workspace }}/appium-logs | ||
adb logcat > ${{ github.workspace }}/appium-logs/flutter.txt & | ||
echo $android_app | ||
ls | ||
APP_PATH=${{ env.APP_PATH }} Platform=android ./gradlew clean test | ||
# appium server -pa=/wd/hub & wait-on http://127.0.0.1:4723/wd/hub/status && | ||
- name: upload appium logs | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: appium-logs-java | ||
path: ${{ github.workspace }}/appium-logs |
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
Oops, something went wrong.