Skip to content

Commit 4d6ebeb

Browse files
Fetch builds from latest server release (#24)
FIx android test
1 parent e3b9496 commit 4d6ebeb

File tree

1 file changed

+14
-47
lines changed

1 file changed

+14
-47
lines changed

.github/workflows/main.yml

Lines changed: 14 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -17,62 +17,28 @@ jobs:
1717
steps:
1818
- name: Check out my other private repo
1919
uses: actions/checkout@master
20-
with:
21-
path: 'server'
22-
repository: AppiumTestDistribution/appium-flutter-server
2320
- name: Set up JDK 17
2421
uses: actions/setup-java@v3
2522
with:
2623
java-version: '17'
2724
distribution: 'adopt'
2825
- name: Setup Android SDK
2926
uses: android-actions/setup-android@v2.0.10
30-
- uses: subosito/flutter-action@v2
31-
with:
32-
flutter-version: 3.22.1
33-
channel: 'stable'
34-
- run: |
35-
ls
36-
cd server/demo-app
37-
dart pub global activate rps --version 0.8.0
38-
flutter build apk --debug
39-
cd android && ./gradlew app:assembleDebug -Ptarget=`pwd`/../integration_test/appium.dart
27+
4028
- name: 'List files'
41-
continue-on-error: true
42-
run: |
43-
ls -l ${{ github.workspace }}/server/demo-app/build/app/outputs/apk/debug/
44-
45-
- name: Upload artifacts
46-
uses: actions/upload-artifact@v4
47-
with:
48-
name: Android-build
49-
path: ${{ github.workspace }}/server/demo-app/build/app/outputs/apk/debug/app-debug.apk
50-
Run_Tests:
51-
needs: Build_Server
52-
runs-on: ubuntu-latest
53-
strategy:
54-
matrix:
55-
api-level: [29]
56-
target: [google_apis]
57-
steps:
58-
- uses: actions/checkout@v2
29+
run: |
30+
release_info=$(curl -s https://api.github.com/repos/AppiumTestDistribution/appium-flutter-server/releases/latest)
31+
asset_urls=$(echo "$release_info" | grep "browser_download_url" | cut -d '"' -f 4)
32+
android_app=$(echo "$asset_urls" | head -n 1)
33+
echo "$android_app"
34+
ios_app=$(echo "$asset_urls" | tail -n 1)
35+
echo "$ios_app"
36+
curl -LO $android_app
37+
ls ${{ github.workspace }}
38+
echo "APP_PATH=${{ github.workspace }}/app-debug.apk" >> $GITHUB_ENV
5939
- uses: actions/setup-node@v4
6040
with:
6141
node-version: 20
62-
- name: Set up JDK 17
63-
uses: actions/setup-java@v3
64-
with:
65-
java-version: '17'
66-
distribution: 'adopt'
67-
- uses: dawidd6/action-download-artifact@v3
68-
with:
69-
name: Android-build
70-
- name: Display structure of downloaded files
71-
run: ls -R
72-
- uses: subosito/flutter-action@v2
73-
with:
74-
flutter-version: 3.19.6
75-
channel: 'stable'
7642
- name: Enable KVM group perms
7743
run: |
7844
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
@@ -86,6 +52,7 @@ jobs:
8652
arch: x86_64
8753
profile: Nexus 6
8854
script: |
55+
echo ${{ env }}
8956
adb devices
9057
node --version
9158
npm install -g wait-on
@@ -96,8 +63,8 @@ jobs:
9663
appium driver list
9764
mkdir ${{ github.workspace }}/appium-logs
9865
adb logcat > ${{ github.workspace }}/appium-logs/flutter.txt &
99-
APP_PATH=$APP_PATH npm run wdio-android
100-
adb logcat -t 1000 | grep "flutter"
66+
echo $android_app
67+
APP_PATH=${{ env.APP_PATH }} npm run wdio-android
10168
# appium server -pa=/wd/hub & wait-on http://127.0.0.1:4723/wd/hub/status &&
10269
- name: upload appium logs
10370
if: always()

0 commit comments

Comments
 (0)