Skip to content

Commit 6f02936

Browse files
committed
feat(build): Migrate develop PullRequest CircleCI to GithubAction
1 parent be37e39 commit 6f02936

File tree

4 files changed

+77
-4
lines changed

4 files changed

+77
-4
lines changed
File renamed without changes.
File renamed without changes.
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: GLPI Android Inventory Library CI
2+
3+
env:
4+
module_app: app
5+
6+
on:
7+
pull_request:
8+
branches:
9+
- "develop"
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
- name: set up JDK 11
17+
uses: actions/setup-java@v3
18+
with:
19+
java-version: '11'
20+
distribution: 'temurin'
21+
cache: gradle
22+
23+
24+
##############################################
25+
# Prepare / Build project APK / AAR / JAR #
26+
##############################################
27+
# Grant execute permission for gradlew
28+
- name: Grant execute permission for gradlew
29+
run: chmod +x gradlew
30+
# Build app
31+
- name: Build with Gradle
32+
run: ./gradlew build
33+
# Create APK For Firebase Instrumentation Tests
34+
- name: Build Debug Test APK (for Firebase Test Lab)
35+
run: ./gradlew assembleDebugAndroidTest
36+
37+
################################################################################################
38+
# Run Firebase Test Lab #
39+
# See : https://medium.com/firebase-developers/github-actions-firebase-test-lab-4bc830685a99 #
40+
# See : https://github.com/google-github-actions/auth #
41+
# See : https://github.com/google-github-actions/setup-gcloud #
42+
################################################################################################
43+
# Login to Google using Firebase Admin SDK Service Agent Key
44+
- id: 'auth'
45+
name: Login to Google Cloud
46+
uses: 'google-github-actions/auth@v1'
47+
with:
48+
credentials_json: ${{ secrets.GCP_CREDENTIALS }}
49+
50+
# Set up Cloud SDK
51+
- name: 'Set up Cloud SDK'
52+
uses: 'google-github-actions/setup-gcloud@v1'
53+
54+
# Set Firebase Project ID
55+
- name: Set current project
56+
run: gcloud config set project ${{ secrets.FIREBASE_PROJECT_ID }}
57+
58+
# Run Instrumentation Tests in Firebase Test Lab
59+
- name: Run Instrumentation Tests in Firebase Test Lab
60+
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=Nexus6,version=25,locale=en,orientation=portrait
61+
62+
63+
##########################################
64+
# Upload Artifacts (APK / AAR / JAR) #
65+
##########################################
66+
# Upload APK for Java version
67+
- name: Upload APK Debug for Java
68+
uses: actions/upload-artifact@v3
69+
with:
70+
name: Java-Debug-APK
71+
path: ${{ env.module_app }}/build/outputs/apk/debug/${{ env.module_app }}-debug.apk
72+
73+

app/src/main/assets/about.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
about.version=1.2.0
2-
about.build=39349
3-
about.date=Thu Apr 21 10:43:44 2022
4-
about.commit=bac1c99
5-
about.commitFull=bac1c99763f2b204a1cfaf0a7b74296cff0fc5ab
2+
about.build=39351
3+
about.date=ven. août 25 11:27:12 2023
4+
about.commit=
5+
about.commitFull=
66
about.github=https://github.com/glpi-project/android-inventory-agent

0 commit comments

Comments
 (0)