Skip to content

Commit

Permalink
ci(android): run android sdk test
Browse files Browse the repository at this point in the history
  • Loading branch information
erka committed Jan 4, 2025
1 parent 2704720 commit 4f2606e
Showing 1 changed file with 34 additions and 35 deletions.
69 changes: 34 additions & 35 deletions .github/workflows/test-android-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,50 +49,49 @@ jobs:
uses: actions/download-artifact@v4
with:
github-token: ${{ steps.generate_token.outputs.token }}
name: flipt-engine-ffi-x86_64-linux-android.tar.gz
path: flipt-engine-ffi-x86_64-linux-android.tar.gz
name: flipt-engine-ffi-Android-x86_64.tar.gz
path: flipt-engine-ffi-Android-x86_64.tar.gz

- name: Download Artifact (arm64)
uses: actions/download-artifact@v4
with:
github-token: ${{ steps.generate_token.outputs.token }}
name: flipt-engine-ffi-aarch64-linux-android.tar.gz
path: flipt-engine-ffi-aarch64-linux-android.tar.gz
name: flipt-engine-ffi-Android-arm64.tar.gz
path: flipt-engine-ffi-Android-arm64.tar.gz

- name: Extract Artifacts
run: |
tar -xzvf flipt-engine-ffi-x86_64-linux-android.tar.gz -C ./flipt-engine-ffi-x86_64-linux-android
tar -xzvf flipt-engine-ffi-aarch64-linux-android.tar.gz -C ./flipt-engine-ffi-aarch64-linux-android
ls -la ./flipt-engine-ffi-x86_64-linux-android
ls -la ./flipt-engine-ffi-aarch64-linux-android
tar -xzvf flipt-engine-ffi-Android-x86_64.tar.gz -C ./flipt-engine-ffi-Android-x86_64
tar -xzvf flipt-engine-ffi-Android-arm64.tar.gz -C ./flipt-engine-ffi-Android-arm64
ls -la ./flipt-engine-ffi-Android-x86_64
ls -la ./flipt-engine-ffi-Android-arm64
- name: Install emulator
run: |
echo "Installing system image..."
echo "yes" | $ANDROID_HOME/tools/bin/sdkmanager "system-images;android-33;default;x86_64"
- name: Create Emulator
run: |
echo "Creating emulator..."
echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd -n testavd -k "system-images;android-33;default;x86_64"
- name: Start Emulator
run: |
echo "Starting emulator..."
$ANDROID_HOME/emulator/emulator -avd testavd -no-audio -no-boot-anim -no-window -gpu swiftshader_indirect -no-snapshot &
- name: Wait for Emulator to Boot
run: |
echo "Waiting for emulator to boot..."
adb wait-for-device
adb shell getprop init.svc.bootanim | grep -m 1 stopped
# - name: Run flipt
# env:
# FLIPT_STORAGE_TYPE: "local"
# FLIPT_STORAGE_LOCAL_PATH: "./test/fixtures/testdata"
# run: flipt&

# - name: Install System Image
# run: |
# echo "Installing system image..."
# sdkmanager "system-images;android-33;google_apis;x86_64"

# - name: Create Emulator
# run: |
# echo "Creating emulator..."
# echo "no" | avdmanager create avd -n test -k "system-images;android-33;google_apis;x86_64" --device "pixel"

# - name: Start Emulator
# run: |
# echo "Starting emulator..."
# $ANDROID_HOME/emulator/emulator -avd test -no-audio -no-boot-anim -no-window -gpu swiftshader_indirect &

# - name: Wait for Emulator to Boot
# run: |
# echo "Waiting for emulator to boot..."
# adb wait-for-device
# adb shell getprop init.svc.bootanim | grep -m 1 stopped

# - name: Run Integration Tests
# env:
# FLIPT_URL: "http://0.0.0.0:8080"
Expand All @@ -101,8 +100,8 @@ jobs:
# cd ./flipt-client-kotlin-android
# ./gradlew connectedAndroidTest

# - name: Stop Emulator
# if: always()
# run: |
# echo "Stopping emulator..."
# adb emu kill
- name: Stop Emulator
if: always()
run: |
echo "Stopping emulator..."
adb emu kill

0 comments on commit 4f2606e

Please sign in to comment.