gitlab-ci: run all test_lint_pmd_checkstyle parts, even after failures

This commit is contained in:
Hans-Christoph Steiner 2021-01-18 19:19:23 +01:00
parent 06b6f8794f
commit c697501f8f

View File

@ -37,18 +37,19 @@ test_lint_pmd_checkstyle:
<<: *test-template <<: *test-template
script: script:
- export EXITVALUE=0 - export EXITVALUE=0
- function set_error() { export EXITVALUE=1; printf "\x1b[31mERROR `history|tail -2|head -1|cut -b 6-500`\x1b[0m\n"; }
- ./gradlew assemble - ./gradlew assemble
# always report on lint errors to the build log # always report on lint errors to the build log
- sed -i -e 's,textReport .*,textReport true,' app/build.gradle - sed -i -e 's,textReport .*,textReport true,' app/build.gradle
- ./gradlew testFullDebugUnitTest || ./gradlew testFullDebugUnitTest || ./gradlew testFullDebugUnitTest || set_error - ./gradlew testFullDebugUnitTest || ./gradlew testFullDebugUnitTest || ./gradlew testFullDebugUnitTest || set_error
- ./gradlew lint - ./gradlew lint || set_error
- ./gradlew pmd || (export EXITVALUE=1; echo ERROR !!) - ./gradlew pmd || set_error
- ./gradlew checkstyle || (export EXITVALUE=1; echo ERROR !!) - ./gradlew checkstyle || set_error
- ./tools/check-format-strings.py || (export EXITVALUE=1; echo ERROR !!) - ./tools/check-format-strings.py || set_error
- ./tools/check-fastlane-whitespace.py || (export EXITVALUE=1; echo ERROR !!) - ./tools/check-fastlane-whitespace.py || set_error
- ./tools/remove-unused-and-blank-translations.py || (export EXITVALUE=1; echo ERROR !!) - ./tools/remove-unused-and-blank-translations.py || set_error
- echo "These are unused or blank translations that should be removed:" - echo "These are unused or blank translations that should be removed:"
- git --no-pager diff --ignore-all-space --name-only --exit-code app/src/*/res/values*/strings.xml || (export EXITVALUE=1; echo ERROR !!) - git --no-pager diff --ignore-all-space --name-only --exit-code app/src/*/res/values*/strings.xml || set_error
- exit $EXITVALUE - exit $EXITVALUE
errorprone: errorprone: