From a6826e2508cc824fb7b2ea726d1135f4a5da5796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Rebelo?= Date: Wed, 6 Sep 2023 21:59:37 +0100 Subject: [PATCH] last --- .woodpecker/run_tests.yml | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/.woodpecker/run_tests.yml b/.woodpecker/run_tests.yml index ff83a005d..c129f8168 100644 --- a/.woodpecker/run_tests.yml +++ b/.woodpecker/run_tests.yml @@ -1,20 +1,28 @@ steps: tests: image: codeberg.org/freeyourgadget/android-fdroid-tools:latest - commands: - - pwd #bump - - exit 1 - - 'echo "Pipeline status: $CI_STEP_STATUS"' - # mark pipeline as failed if the tests failed, but linter will still run - - '[ "$CI_STEP_STATUS" == "success" ] || touch .pipeline_failure' + commands: | + pwd + ./gradlew :app:testBangleDebugUnitTest :app:testMainDebugUnitTest + if [ $? -ne 0 ]; then + touch .pipeline_failure + fi failure: ignore lint: image: codeberg.org/freeyourgadget/android-fdroid-tools:latest - commands: - - pwd #bump - - ./gradlew lint - - '[ ! -f .pipeline_failure ] || exit 1' + commands: | + pwd + ./gradlew lint + + failure_check: + image: codeberg.org/freeyourgadget/android-fdroid-tools:latest + commands: | + pwd + if [ -f .pipeline_failure ]; then + echo "One of the previous steps failed, failing the pipeline" + exit 1; + fi #when: #repo: Freeyourgadget/Gadgetbridge