Skip to content

Change branch name

Change branch name #1

Workflow file for this run

name: Cloudinary Android SDK Build and Test
on:
push:
branches:
- feature/github_actions # Update with your branch name
jobs:
build:
runs-on: ubuntu-latest # You may choose another supported OS
env:
TARGET_VERSION: 30
ANDROID_BUILD_TOOLS_VERSION: 30.0.2
ANDROID_HOME: ${{ github.workspace }}/android-sdk
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
- name: Download and Install Android SDK
run: |
mkdir -p $ANDROID_HOME
wget "https://dl.google.com/android/repository/commandlinetools-linux-7302050_latest.zip" -O commandlinetools.zip
unzip -q commandlinetools.zip -d $ANDROID_HOME/
yes | $ANDROID_HOME/cmdline-tools/bin/sdkmanager "platforms;android-${TARGET_VERSION}" --sdk_root=$ANDROID_HOME
yes | $ANDROID_HOME/cmdline-tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" --sdk_root=$ANDROID_HOME
- name: Accept Android Licenses
run: yes | $ANDROID_HOME/cmdline-tools/bin/sdkmanager --licenses
- name: Cache Gradle Dependencies
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
- name: Create and Start Emulator
run: |
echo no | android create avd --force -n test -t android-21
emulator -avd test -no-audio -no-window &
android-wait-for-emulator
adb shell input keyevent 82
- name: Set Cloudinary URL
run: export CLOUDINARY_URL=$(bash tools/get_test_cloud.sh)
- name: Build and Test
run: ./gradlew clean connectedCheck