138 lines (117 loc) 路 3.67 KB
/
android-integration.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
name: Android Integration
on:
push:
branches: [develop]
pull_request:
branches: [develop]
jobs:
compile_screenshots:
name: Compile Screenshot Tests
runs-on: ubuntu-20.04
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: "adopt"
java-version: "11"
- name: Compile screenshots android tests
uses: eskatos/gradle-command-action@v1
with:
arguments: >
compileOffPlaystoreScreenshotsAndroidTestSources
-PtestBuildType=screenshots
test:
name: Unit Tests
runs-on: ubuntu-20.04
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: "adopt"
java-version: "11"
- name: Run unit tests
uses: eskatos/gradle-command-action@v1
with:
arguments: >
testObfPlaystoreDebugUnitTest
testOffPlaystoreDebugUnitTest
testOpfPlaystoreDebugUnitTest
testOpffPlaystoreDebugUnitTest
assemble_apk:
name: Assemble APKs
runs-on: ubuntu-20.04
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: "adopt"
java-version: "11"
- name: Workaround for Android Gradle Plugin issue
run: 'echo "ndk.dir=${ANDROID_HOME}/ndk-bundle" > local.properties'
- name: Assemble debug APKs
uses: eskatos/gradle-command-action@v1
with:
arguments: assembleDebug
- name: Upload OBF APKs
uses: actions/upload-artifact@v2.2.3
with:
name: OBF
path: |
./app/build/outputs/apk/obfPlaystore/debug/app-obf-playstore-debug.apk
./app/build/outputs/apk/obfFdroid/debug/app-obf-fdroid-debug.apk
- name: Upload OFF APK
uses: actions/upload-artifact@v2.2.3
with:
name: OFF
path: |
./app/build/outputs/apk/offPlaystore/debug/app-off-playstore-debug.apk
./app/build/outputs/apk/offFdroid/debug/app-off-fdroid-debug.apk
- name: Upload OPF APK
uses: actions/upload-artifact@v2.2.3
with:
name: OPF
path: |
./app/build/outputs/apk/opfPlaystore/debug/app-opf-playstore-debug.apk
./app/build/outputs/apk/opfFdroid/debug/app-opf-fdroid-debug.apk
- name: Upload OPFF APK
uses: actions/upload-artifact@v2.2.3
with:
name: OPFF
path: |
./app/build/outputs/apk/opffPlaystore/debug/app-opf-playstore-debug.apk
./app/build/outputs/apk/opffFdroid/debug/app-opff-fdroid-debug.apk
# lint:
# name: Lint
# runs-on: ubuntu-20.04
#
# steps:
# - name: Checkout sources
# uses: actions/checkout@v2
#
# - name: Set up JDK 11
# uses: actions/setup-java@v2
# with:
# distribution: 'adopt'
# java-version: '11'
#
# - name: Workaround for Android Gradle Plugin issue
# run: "echo \"ndk.dir=${ANDROID_HOME}/ndk-bundle\" > local.properties"
#
# - name: Increase gradle daemon memory
# run: "echo \"org.gradle.jvmargs=-Xmx4096m\" > gradle.properties"
#
# - name: Lint sources
# uses: eskatos/gradle-command-action@v1
# with:
# arguments: lint --stacktrace
#
# - name: Generate GitHub annotations
# uses: yutailang0119/action-android-lint@v1.0.2
# with:
# xml_path: ./app/build/reports/lint-results.xml