-
Notifications
You must be signed in to change notification settings - Fork 7
78 lines (64 loc) · 2.24 KB
/
PR.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Android PR CI
on:
pull_request:
paths-ignore:
- '**.md'
- 'media/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: set up JDK 17
uses: actions/[email protected]
with:
java-version: '17'
distribution: 'adopt'
- name: Setup Gradle
uses: gradle/[email protected]
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Build with Gradle
env:
MONSTER_COMPENDIUM_KEYSTORE_PASSWORD: ${{ secrets.MONSTER_COMPENDIUM_KEYSTORE_PASSWORD }}
run: ./gradlew assembleDebug testDebugUnitTest jvmTest -Pdev
- name: Run Android UI tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
script: ./gradlew :app:connectedCheck
- name: Verify database migration
run: chmod +x ./scripts/sqldelight/verifyDatabaseMigration && ./scripts/sqldelight/verifyDatabaseMigration
- name: Generate AAB
env:
MONSTER_COMPENDIUM_KEYSTORE_PASSWORD: ${{ secrets.MONSTER_COMPENDIUM_KEYSTORE_PASSWORD }}
run: ./gradlew bundleRelease
- name: Upload the test report
if: failure()
uses: actions/[email protected]
with:
name: TestReport
path: |
feature-monster-compendium/build/reports/tests
data/build/reports/tests
domain/build/reports/tests
- name: Upload an APK
uses: actions/[email protected]
with:
name: app-dev-release.apk
path: app/build/outputs/apk/release/app-dev-release.apk
- name: Upload an APK metadata JSON
uses: actions/[email protected]
with:
name: output-metadata.json
path: app/build/outputs/apk/release/output-metadata.json
- name: Upload an AAB
uses: actions/[email protected]
with:
name: app-release.aab
path: app/build/outputs/bundle/release/app-release.aab