From ee8586e7c4ad3b60c497d35d2bfa21a02b7d27fd Mon Sep 17 00:00:00 2001 From: json Date: Tue, 26 Dec 2023 23:46:28 +0800 Subject: [PATCH] [19310] Created an android ci for tripkit-android repo --- .github/workflows/android_ci.yml | 53 ++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/android_ci.yml diff --git a/.github/workflows/android_ci.yml b/.github/workflows/android_ci.yml new file mode 100644 index 00000000..87304c1a --- /dev/null +++ b/.github/workflows/android_ci.yml @@ -0,0 +1,53 @@ +name: Android CI + +on: + push: + branches: [ release/test ] + pull_request: + branches: [ release/test ] + +jobs: + build: + name: Build and Test + runs-on: ubuntu-20.04 + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Set up JDK 8 + uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: '8' + + - name: Setup Android Environment + run: | + sudo apt-get update + sudo apt-get install -y android-sdk + echo "y" | sudo sdkmanager "build-tools;28.0.3" "platforms;android-28" "extras;google;m2repository" "extras;android;m2repository" + + - name: Accept licenses + run: yes | sdkmanager --licenses + + - name: Cache Gradle dependencies + uses: actions/cache@v3 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + ~/.android/build-cache + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} + restore-keys: | + ${{ runner.os }}-gradle- + + - name: Grant execute permission for Gradle wrapper + run: chmod +x gradlew + + - name: Build Release APK + run: ./gradlew clean assembleRelease + + - name: Run tests + run: ./gradlew test + + - name: List All Directories and Subdirectories of Root + run: find . -type d \ No newline at end of file