@@ -20,38 +20,10 @@ jobs:
2020 - name : Checkout Repository
2121 uses : actions/checkout@v4
2222
23- - name : Setup JDK 21
24- uses : actions/setup-java@v4
25- with :
26- java-version : ' 21'
27- distribution : ' temurin'
28- cache : gradle
29-
30- - name : Setup Android SDK
31- uses : android-actions/setup-android@v2
32-
33- - name : Cache Gradle Wrapper
34- uses : actions/cache@v4
35- with :
36- path : ~/.gradle/wrapper
37- key : ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
38- restore-keys : |
39- ${{ runner.os }}-gradle-wrapper-
40-
41- - name : Cache Build Cache
42- uses : actions/cache@v4
43- with :
44- path : ~/.gradle/caches/build-cache-1
45- key : ${{ runner.os }}-build-cache-${{ hashFiles('**/build.gradle*', '**/gradle-wrapper.properties') }}-${{ github.sha }}
46- restore-keys : |
47- ${{ runner.os }}-build-cache-${{ hashFiles('**/build.gradle*', '**/gradle-wrapper.properties') }}
48- ${{ runner.os }}-build-cache-
49-
50- - name : Generate local.properties
51- run : echo '${{ secrets.LOCAL_PROPERTIES }}' | base64 -d > ./local.properties
52-
53- - name : Grant execute permission for gradlew
54- run : chmod +x gradlew
23+ - name : Setup
24+ uses : ./.github/actions/setup-android
25+ env :
26+ LOCAL_PROPERTIES : ${{ secrets.LOCAL_PROPERTIES }}
5527
5628 - name : Code Style Check
5729 id : ktlint
6133 end=$(date +%s)
6234 echo "time=$((end-start))" >> $GITHUB_OUTPUT
6335
64- - name : Unit Test
65- id : test
66- run : |
67- start=$(date +%s)
68- ./gradlew testDebugUnitTest --parallel
69- end=$(date +%s)
70- echo "time=$((end-start))" >> $GITHUB_OUTPUT
71-
7236 - name : Debug Build with Gradle
7337 id : assemble
7438 run : |
9155 with :
9256 script : |
9357 const results = {
94- test: {
95- status: '${{ steps.test.outcome }}',
96- name: 'Unit Test',
97- time: '${{ steps.test.outputs.time }}'
98- },
9958 assemble: {
10059 status: '${{ steps.assemble.outcome }}',
10160 name: 'Debug Build',
0 commit comments