Skip to content

Commit 017d7d6

Browse files
committed
ci: consolidate Android verification
1 parent dc97bed commit 017d7d6

1 file changed

Lines changed: 12 additions & 37 deletions

File tree

.github/workflows/android.yml

Lines changed: 12 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,25 @@ jobs:
5555
test -f "$platform/android.jar"
5656
) 9>"$ANDROID_HOME/.platform-install.lock"
5757
58-
debug-apk:
58+
verify:
5959
needs: prepare-sdk
6060
runs-on: [self-hosted, Linux, X64, arko, android]
61-
timeout-minutes: 20
61+
timeout-minutes: 30
6262
env:
6363
GRADLE_USER_HOME: ${{ github.workspace }}/../.gradle-user-home
6464
steps:
6565
- name: Checkout
6666
uses: actions/checkout@v5
6767

68-
- name: Build debug APK
69-
timeout-minutes: 15
70-
run: ./gradlew --no-daemon --build-cache --stacktrace :app:assembleDebug
68+
- name: Verify Android project
69+
timeout-minutes: 25
70+
run: |
71+
./gradlew --no-daemon --build-cache --stacktrace \
72+
:player:testDebugUnitTest \
73+
:app:testDebugUnitTest \
74+
:player:lintDebug \
75+
:app:lintDebug \
76+
:app:assembleDebug
7177
7278
- name: Upload debug APK
7379
if: ${{ github.ref != 'refs/heads/main' }}
@@ -78,20 +84,6 @@ jobs:
7884
if-no-files-found: error
7985
retention-days: 14
8086

81-
lint:
82-
needs: prepare-sdk
83-
runs-on: [self-hosted, Linux, X64, arko, android]
84-
timeout-minutes: 20
85-
env:
86-
GRADLE_USER_HOME: ${{ github.workspace }}/../.gradle-user-home
87-
steps:
88-
- name: Checkout
89-
uses: actions/checkout@v5
90-
91-
- name: Run lint
92-
timeout-minutes: 15
93-
run: ./gradlew --no-daemon --build-cache --stacktrace :player:lintDebug :app:lintDebug
94-
9587
- name: Upload lint report
9688
if: ${{ always() }}
9789
uses: actions/upload-artifact@v5
@@ -103,25 +95,8 @@ jobs:
10395
if-no-files-found: ignore
10496
retention-days: 14
10597

106-
unit-tests:
107-
needs: prepare-sdk
108-
runs-on: [self-hosted, Linux, X64, arko, android]
109-
timeout-minutes: 15
110-
env:
111-
GRADLE_USER_HOME: ${{ github.workspace }}/../.gradle-user-home
112-
steps:
113-
- name: Checkout
114-
uses: actions/checkout@v5
115-
116-
- name: Run unit tests
117-
timeout-minutes: 10
118-
run: ./gradlew --no-daemon --build-cache --stacktrace :app:testDebugUnitTest
119-
12098
release:
121-
needs:
122-
- debug-apk
123-
- lint
124-
- unit-tests
99+
needs: verify
125100
if: ${{ github.ref == 'refs/heads/main' && (github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.publish_release)) }}
126101
runs-on: [self-hosted, Linux, X64, arko, android]
127102
timeout-minutes: 35

0 commit comments

Comments
 (0)