@@ -188,18 +188,20 @@ if [ "$RUN_ONLY_INTEGRATION_TESTS" = 'no' ]; then
188
188
print_status " $FINDBUGS_STATUS " ' Run FindBugs'
189
189
fi
190
190
191
- mvn --batch-mode verify -Denforcer.skip=true -DskipUnitTests=true \
192
- > verify-raw.log 2>&1 || VERIFY_STATUS=fail
193
- # Workaround for #538
194
- " $( dirname " $0 " ) /filter-out-htmlunit-messages.pl" < verify-raw.log > verify.log
195
-
196
- print_status " $VERIFY_STATUS " ' Run integration tests'
197
-
198
-
199
- if [ " $DANGER_STATUS " != ' skip' ]; then
200
- danger > danger.log 2>&1 || DANGER_STATUS=fail
191
+ if [ " $RUN_ONLY_INTEGRATION_TESTS " = ' yes' ]; then
192
+ mvn --batch-mode verify -Denforcer.skip=true -DskipUnitTests=true \
193
+ > verify-raw.log 2>&1 || VERIFY_STATUS=fail
194
+ # Workaround for #538
195
+ " $( dirname " $0 " ) /filter-out-htmlunit-messages.pl" < verify-raw.log > verify.log
196
+
197
+ print_status " $VERIFY_STATUS " ' Run integration tests'
198
+
199
+ # run danger after integration tests when the results of all checks and tests are available
200
+ if [ " $DANGER_STATUS " != ' skip' ]; then
201
+ danger > danger.log 2>&1 || DANGER_STATUS=fail
202
+ fi
203
+ print_status " $DANGER_STATUS " ' Run danger'
201
204
fi
202
- print_status " $DANGER_STATUS " ' Run danger'
203
205
204
206
if [ " $RUN_ONLY_INTEGRATION_TESTS " = ' no' ]; then
205
207
[ " $CS_STATUS " = ' skip' ] || print_log cs.log ' Run CheckStyle'
@@ -216,21 +218,25 @@ if [ "$RUN_ONLY_INTEGRATION_TESTS" = 'no' ]; then
216
218
[ " $FINDBUGS_STATUS " = ' skip' ] || print_log findbugs.log ' Run FindBugs'
217
219
fi
218
220
219
- print_log verify.log ' Run integration tests'
220
-
221
- if [ " $DANGER_STATUS " != ' skip' ]; then
222
- print_log danger.log ' Run danger'
223
- fi
224
-
225
- # In order to be able debug robot framework test flakes we need to have a report.
226
- # Just encode it to a gzipped binary form and dump to console.
227
- if fgrep -qs ' status="FAIL"' target/robotframework-reports/output.xml; then
228
- echo " ===== REPORT START ====="
229
- cat target/robotframework-reports/output.xml | gzip -c | base64
230
- echo " ===== REPORT END ====="
221
+ if [ " $RUN_ONLY_INTEGRATION_TESTS " = ' yes' ]; then
222
+ print_log verify.log ' Run integration tests'
223
+
224
+ if [ " $DANGER_STATUS " != ' skip' ]; then
225
+ print_log danger.log ' Run danger'
226
+ fi
227
+
228
+ # In order to be able debug robot framework test flakes we need to have a report.
229
+ # Just encode it to a gzipped binary form and dump to console.
230
+ if fgrep -qs ' status="FAIL"' target/robotframework-reports/output.xml; then
231
+ echo " ===== REPORT START ====="
232
+ cat target/robotframework-reports/output.xml | gzip -c | base64
233
+ echo " ===== REPORT END ====="
234
+ fi
231
235
fi
232
236
233
- rm -f cs.log pmd.log codenarc.log license.log pom.log bootlint.log rflint.log jasmine.log validator.log enforcer.log test.log findbugs.log verify-raw.log verify.log danger.log
237
+ # We don't remove the logs to make them available to danger that may be executed later as a separate
238
+ # script invocation
239
+ # rm -f cs.log pmd.log codenarc.log license.log pom.log bootlint.log rflint.log jasmine.log validator.log enforcer.log test.log findbugs.log verify-raw.log verify.log danger.log
234
240
235
241
if echo " $CS_STATUS$PMD_STATUS$CODENARC_STATUS$LICENSE_STATUS$POM_STATUS$BOOTLINT_STATUS$RFLINT_STATUS$JASMINE_STATUS$HTML_STATUS$ENFORCER_STATUS$TEST_STATUS$FINDBUGS_STATUS$VERIFY_STATUS$DANGER_STATUS " | fgrep -qs ' fail' ; then
236
242
exit 1
0 commit comments