@@ -11,39 +11,185 @@ jobs:
1111 steps :
1212 - uses : actions/checkout@v2
1313
14- # Cache dependencies
15- - name : Cache Gradle packages
16- uses : actions/cache@v2
17- with :
18- path : |
19- ~/.gradle/caches
20- ~/.gradle/wrapper
21- key : ${{ runner.OS }}-gradle-cache-${{ hashFiles('**/build.gradle') }}
22-
2314 # Set up JDK 1.8
24- - name : set up JDK 1.8
15+ - name : Set up JDK 1.8
2516 uses : actions/setup-java@v1
2617 with :
2718 java-version : 1.8
2819
2920 # Build with Gradle
3021 - name : Build with Gradle
31- run : chmod +x gradlew && ./gradlew build check
22+ run : chmod +x gradlew && ./gradlew assembleDebug
3223
33- # Upload Build Reports
34- - name : Upload Reports
35- uses : actions/upload-artifact@v2.2.0
24+ # Upload build artifacts
25+ - name : Upload build artifacts
26+ uses : actions/upload-artifact@v2
3627 with :
3728 # Artifact name
38- name : reports
29+ name : build
3930 # File path describing what artifact to upload
40- path : mifosng-android/build/reports/ **
31+ path : mifosng-android/build/**
4132
4233 # Upload APK
4334 - name : Upload APK
44- uses : actions/upload-artifact@v2.2.0
35+ uses : actions/upload-artifact@v2
4536 with :
4637 # Artifact name
47- name : android-client
38+ name : android-client-app
4839 # File path describing what artifact to upload
4940 path : mifosng-android/build/outputs/apk/debug/mifosng-android-debug.apk
41+
42+ test :
43+ needs : build
44+ runs-on : ubuntu-latest
45+ steps :
46+ - uses : actions/checkout@v2
47+
48+ # Set up JDK 1.8
49+ - name : Set up JDK 1.8
50+ uses : actions/setup-java@v1
51+ with :
52+ java-version : 1.8
53+
54+ # Download build artifacts
55+ - name : Download build artifacts
56+ uses : actions/download-artifact@v2
57+ with :
58+ name : build
59+
60+ # Test with Gradle
61+ - name : Test App
62+ run : ./gradlew test
63+
64+ # Upload test reports
65+ - name : Upload Test Reports
66+ uses : actions/upload-artifact@v2.2.0
67+ with :
68+ # Artifact name
69+ name : test-reports
70+ # File path describing what artifact to upload
71+ path : mifosng-android/build/reports/tests/**
72+
73+ lintCheck :
74+ needs : test
75+ runs-on : ubuntu-latest
76+ steps :
77+ - uses : actions/checkout@v2
78+
79+ # Set up JDK 1.8
80+ - name : Set up JDK 1.8
81+ uses : actions/setup-java@v1
82+ with :
83+ java-version : 1.8
84+
85+ # Download build artifacts
86+ - name : Download build artifacts
87+ uses : actions/download-artifact@v2
88+ with :
89+ name : build
90+
91+ # Perform Lint Check
92+ - name : Lint Check
93+ run : ./gradlew lint
94+
95+ # Upload reports
96+ - name : Upload Lint Reports
97+ uses : actions/upload-artifact@v2.2.0
98+ with :
99+ # Artifact name
100+ name : lint-reports
101+ # File path describing what artifact to upload
102+ path : mifosng-android/build/reports/lint-results**
103+
104+ pmd :
105+ needs : test
106+ runs-on : ubuntu-latest
107+ steps :
108+ - uses : actions/checkout@v2
109+
110+ # Set up JDK 1.8
111+ - name : Set up JDK 1.8
112+ uses : actions/setup-java@v1
113+ with :
114+ java-version : 1.8
115+
116+ # Download build artifacts
117+ - name : Download build artifacts
118+ uses : actions/download-artifact@v2
119+ with :
120+ name : build
121+
122+ # Perform PMD Check
123+ - name : PMD Check
124+ run : ./gradlew pmd
125+
126+ # Upload reports
127+ - name : Upload PMD Reports
128+ uses : actions/upload-artifact@v2.2.0
129+ with :
130+ # Artifact name
131+ name : pmd-reports
132+ # File path describing what artifact to upload
133+ path : mifosng-android/build/reports/pmd/**
134+
135+ checkstyle :
136+ needs : test
137+ runs-on : ubuntu-latest
138+ steps :
139+ - uses : actions/checkout@v2
140+
141+ # Set up JDK 1.8
142+ - name : Set up JDK 1.8
143+ uses : actions/setup-java@v1
144+ with :
145+ java-version : 1.8
146+
147+ # Download build artifacts
148+ - name : Download build artifacts
149+ uses : actions/download-artifact@v2
150+ with :
151+ name : build
152+
153+ # Perform Checkstyle Check
154+ - name : Checkstyle
155+ run : ./gradlew checkstyle
156+
157+ # Upload reports
158+ - name : Upload Checkstyle Reports
159+ uses : actions/upload-artifact@v2.2.0
160+ with :
161+ # Artifact name
162+ name : checkstyle-reports
163+ # File path describing what artifact to upload
164+ path : mifosng-android/build/reports/checkstyle/**
165+
166+ findbugs :
167+ needs : test
168+ runs-on : ubuntu-latest
169+ steps :
170+ - uses : actions/checkout@v2
171+
172+ # Set up JDK 1.8
173+ - name : Set up JDK 1.8
174+ uses : actions/setup-java@v1
175+ with :
176+ java-version : 1.8
177+
178+ # Download build artifacts
179+ - name : Download build artifacts
180+ uses : actions/download-artifact@v2
181+ with :
182+ name : build
183+
184+ # Find bugs Check
185+ - name : Findbugs
186+ run : ./gradlew findbugs
187+
188+ # Upload reports
189+ - name : Upload Checkstyle Reports
190+ uses : actions/upload-artifact@v2.2.0
191+ with :
192+ # Artifact name
193+ name : findbugs-reports
194+ # File path describing what artifact to upload
195+ path : mifosng-android/build/reports/findbugs/**
0 commit comments