-
Notifications
You must be signed in to change notification settings - Fork 59
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
4 changed files
with
67 additions
and
100 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,66 @@ | ||
name: Test | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
env: | ||
TARGET_VERSION: 30 | ||
ANDROID_BUILD_TOOLS_VERSION: 30.0.2 | ||
ANDROID_HOME: /usr/local/android-sdk | ||
MALLOC_ARENA_MAX: 2 | ||
ADB_INSTALL_TIMEOUT: 20 | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '11' | ||
|
||
- name: Setup Android SDK | ||
uses: android-actions/setup-android@v2 | ||
|
||
- name: Install Android SDK components | ||
run: | | ||
cd $ANDROID_HOME/cmdline-tools/latest/bin | ||
./sdkmanager "platform-tools" | ||
./sdkmanager "emulator" | ||
./sdkmanager "tools" | ||
./sdkmanager "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" | ||
./sdkmanager "platforms;android-${TARGET_VERSION}" | ||
./sdkmanager "system-images;android-30;google_apis;x86" | ||
- name: Enable KVM | ||
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: Create AVD | ||
run: | | ||
cd $ANDROID_HOME/cmdline-tools/latest/bin | ||
echo no | ./avdmanager create avd -n test -k "system-images;android-30;google_apis;x86" --force | ||
- name: Start ADB Server | ||
run: adb start-server | ||
|
||
- name: Start Emulator | ||
run: | | ||
echo "Starting emulator..." | ||
export PATH=$PATH:$ANDROID_HOME/emulator | ||
emulator -avd test -no-audio -no-window -no-boot-anim -no-metrics & | ||
# Wait for the emulator to start up | ||
sleep 120 | ||
- name: Export CLOUDINARY_URL | ||
run: | | ||
export CLOUDINARY_URL=$(bash tools/get_test_cloud.sh) | ||
echo "CLOUDINARY_URL=$CLOUDINARY_URL" >> $GITHUB_ENV | ||
- name: Run tests | ||
run: ./gradlew clean connectedCheck --stacktrace |
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
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