From c369709c547dc1b38639ee04b60856e4c3542510 Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Wed, 25 May 2022 16:27:51 -0300 Subject: [PATCH] Move test_lint_pmd_checkstyle CI job to fail on first error in order to make it easier to find out what actually made the CI fail --- .gitlab-ci.yml | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7980d12d6..b70209218 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,27 +46,17 @@ stages: after_script: - echo "Download debug artifacts from https://gitlab.com/${CI_PROJECT_PATH}/-/jobs" -# Run the most important first. Then we can decide whether to ignore -# the style tests if the rest of the more meaningful tests pass. test_lint_pmd_checkstyle: <<: *test-template script: - - 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 # always report on lint errors to the build log - sed -i -e 's,textReport .*,textReport true,' app/build.gradle - - ./gradlew testDebugUnitTest testFullDebugUnitTest || set_error - - ./gradlew lint || set_error - - ./gradlew pmd || set_error - - ./gradlew checkstyle || set_error - - ./gradlew ktlintCheck || set_error - - ./tools/check-format-strings.py || set_error - - ./tools/check-fastlane-whitespace.py || set_error - - ./tools/remove-unused-and-blank-translations.py || set_error + - ./gradlew lint pmd checkstyle ktlintCheck testDebugUnitTest testFullDebugUnitTest + - ./tools/check-format-strings.py + - ./tools/check-fastlane-whitespace.py + - ./tools/remove-unused-and-blank-translations.py - 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 || set_error - - exit $EXITVALUE + - git --no-pager diff --ignore-all-space --name-only --exit-code app/src/*/res/values*/strings.xml errorprone: extends: .base