Remove deprecated code from build-logic #263
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
name: Android CI | |
on: | |
push: | |
branches: [ "main" ] | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
branches: [ "main" ] | |
paths-ignore: | |
- '**.md' | |
concurrency: | |
group: android-ci-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
checks: write | |
id-token: write | |
env: | |
JAVA_VERSION: "17" | |
JAVA_DISTR: 'zulu' | |
jobs: | |
tests_and_apk: | |
name: "🤖 Local Tests and 📦 APKs" | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 60 | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Validate Gradle Wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: ${{ env.JAVA_DISTR }} | |
java-version: ${{ env.JAVA_VERSION }} | |
- name: Create google-services.json file | |
run: cat /home/runner/work/newquiz/newquiz/app/google-services.json | base64 | |
- name: Put google-services.json data | |
env: | |
DATA: ${{ secrets.GOOGLE_SERVICES_JSON }} | |
run: echo $DATA > /home/runner/work/newquiz/newquiz/app/google-services.json | |
- name: Workaround for Android Gradle Plugin issue | |
run: 'echo "ndk.dir=${ANDROID_HOME}/ndk-bundle" > local.properties' | |
- name: Setup gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Run unit tests | |
run: ./gradlew testAllUnitTest --stacktrace | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@v3 | |
if: success() || failure() # always run even if the previous step fails | |
with: | |
report_paths: '**/build/test-results/test*/TEST-*.xml' | |
- name: Lint sources | |
run: ./gradlew lint --stacktrace | |
- name: Generate GitHub annotations | |
uses: yutailang0119/action-android-lint@v3 | |
with: | |
report-path: '**/build/reports/*.xml' | |
- name: Run Detekt | |
run: ./gradlew detekt --stacktrace | |
- name: Assemble debug APKs | |
run: ./gradlew assembleNormalDebug assembleFossDebug --stacktrace | |
- name: Upload APKs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: APKs | |
path: app/build/outputs/apk/**/app-*-universal-debug.apk |