Fix(core): Android 14 compatibility #77
Workflow file for this run
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: GLPI Android Inventory Library CI | |
env: | |
module_app: app | |
on: | |
pull_request: | |
branches: | |
- "develop" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: set up JDK 11 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
cache: gradle | |
############################################## | |
# Prepare / Build project APK / AAR / JAR # | |
############################################## | |
# Grant execute permission for gradlew | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
# Build app | |
- name: Build with Gradle | |
run: ./gradlew build | |
# Create APK For Firebase Instrumentation Tests | |
- name: Build Debug Test APK (for Firebase Test Lab) | |
run: ./gradlew assembleDebugAndroidTest | |
################################################################################################ | |
# Run Firebase Test Lab # | |
# See : https://medium.com/firebase-developers/github-actions-firebase-test-lab-4bc830685a99 # | |
# See : https://github.com/google-github-actions/auth # | |
# See : https://github.com/google-github-actions/setup-gcloud # | |
################################################################################################ | |
# Login to Google using Firebase Admin SDK Service Agent Key | |
- id: 'auth' | |
name: Login to Google Cloud | |
uses: 'google-github-actions/auth@v2' | |
with: | |
credentials_json: ${{ secrets.GCP_CREDENTIALS }} | |
# Set up Cloud SDK | |
- name: 'Set up Cloud SDK' | |
uses: 'google-github-actions/setup-gcloud@v2' | |
# Set Firebase Project ID | |
- name: Set current project | |
run: gcloud config set project ${{ secrets.FIREBASE_PROJECT_ID }} | |
# Run Instrumentation Tests in Firebase Test Lab | |
# dm3q Samasung galaxy s23 SDK 33 | |
# e1q Samasung galaxy s24 SDK 34 | |
# bluejay Google Pixel 6a SDK 32 | |
# a51 Samsung Galaxy A51 SDK 31 | |
# q2q Samsung Galaxy Z Fold3 SDK 30 | |
# cactus Xiaomi Redmi 6A SDK 27 | |
- name: Run Instrumentation Tests in Firebase Test Lab | |
run: | | |
gcloud firebase test android run --type instrumentation --app ${{ env.module_app }}/build/outputs/apk/debug/${{ env.module_app }}-debug.apk --test ${{ env.module_app }}/build/outputs/apk/androidTest/debug/${{ env.module_app }}-debug-androidTest.apk --device model=e1q,version=34,locale=en,orientation=portrait | |
gcloud firebase test android run --type instrumentation --app ${{ env.module_app }}/build/outputs/apk/debug/${{ env.module_app }}-debug.apk --test ${{ env.module_app }}/build/outputs/apk/androidTest/debug/${{ env.module_app }}-debug-androidTest.apk --device model=dm3q,version=33,locale=en,orientation=portrait | |
gcloud firebase test android run --type instrumentation --app ${{ env.module_app }}/build/outputs/apk/debug/${{ env.module_app }}-debug.apk --test ${{ env.module_app }}/build/outputs/apk/androidTest/debug/${{ env.module_app }}-debug-androidTest.apk --device model=bluejay,version=32,locale=en,orientation=portrait | |
gcloud firebase test android run --type instrumentation --app ${{ env.module_app }}/build/outputs/apk/debug/${{ env.module_app }}-debug.apk --test ${{ env.module_app }}/build/outputs/apk/androidTest/debug/${{ env.module_app }}-debug-androidTest.apk --device model=a51,version=31,locale=en,orientation=portrait | |
gcloud firebase test android run --type instrumentation --app ${{ env.module_app }}/build/outputs/apk/debug/${{ env.module_app }}-debug.apk --test ${{ env.module_app }}/build/outputs/apk/androidTest/debug/${{ env.module_app }}-debug-androidTest.apk --device model=q2q,version=30,locale=en,orientation=portrait | |
gcloud firebase test android run --type instrumentation --app ${{ env.module_app }}/build/outputs/apk/debug/${{ env.module_app }}-debug.apk --test ${{ env.module_app }}/build/outputs/apk/androidTest/debug/${{ env.module_app }}-debug-androidTest.apk --device model=cactus,version=27,locale=en,orientation=portrait | |
########################################## | |
# Upload Artifacts (APK / AAR / JAR) # | |
########################################## | |
# Upload APK for Java version | |
- name: Upload APK Debug for Java | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Java-Debug-APK | |
path: ${{ env.module_app }}/build/outputs/apk/debug/${{ env.module_app }}-debug.apk | |