From f7a957150eb121a3ee5be9755e08b3704e60fa53 Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Mon, 19 Apr 2021 10:50:42 -0300 Subject: [PATCH] Tweak CI rules for optional tests so they are not needed for merge requests --- .gitlab-ci.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 85313abcd..2163f5717 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -25,6 +25,10 @@ test: script: - ./gradlew --no-daemon -Djava.security.egd=file:/dev/urandom animalSnifferMain animalSnifferTest - ./gradlew --no-daemon -Djava.security.egd=file:/dev/urandom check + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + when: always + - when: always android test: extends: .base-test @@ -48,10 +52,15 @@ android test: when: on_failure rules: - if: '$CI_PIPELINE_SOURCE == "schedule"' - - changes: + when: on_success + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + changes: - briar-android/**/* when: manual allow_failure: true + - if: '$CI_COMMIT_TAG == null' + when: manual + allow_failure: true retry: max: 1 tags: @@ -88,6 +97,7 @@ bridge test: extends: .optional_tests rules: - if: '$CI_PIPELINE_SOURCE == "schedule"' + when: on_success allow_failure: true - if: '$CI_COMMIT_TAG == null' when: manual