From 81c9c612c41d4462c8461e656b515e0ed0ebdb02 Mon Sep 17 00:00:00 2001
From: jurgenhaas <juergen.haas@lakedrops.com>
Date: Fri, 26 Apr 2024 17:43:35 +0200
Subject: [PATCH] Disable tests for main branch when being merged from release
 or develop

---
 test-and-deploy.yml | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/test-and-deploy.yml b/test-and-deploy.yml
index 990c4fe..93e0041 100644
--- a/test-and-deploy.yml
+++ b/test-and-deploy.yml
@@ -159,6 +159,12 @@ Debug:
     elif [[ "$CI_COMMIT_MESSAGE" == *"release into main"* ]]; then
       TESTSDISABLED="yes"
       GITLABTESTSDISABLED="yes"
+    elif [[ "$CI_COMMIT_MESSAGE" == *"Merge branch 'release' into 'main'"* ]]; then
+      TESTSDISABLED="yes"
+      GITLABTESTSDISABLED="yes"
+    elif [[ "$CI_COMMIT_MESSAGE" == *"Merge branch 'develop' into 'main'"* ]]; then
+      TESTSDISABLED="yes"
+      GITLABTESTSDISABLED="yes"
     elif [[ "$DISABLE_CI_TEST_BACKSTOP" == "1" && "$DISABLE_CI_TEST_BEHAT" == "1" && "$DISABLE_CI_TEST_CYPRESSE2E" == "1" ]]; then
       echo "DB not required"
     elif [[ "$CI_COMMIT_REF_NAME" == "main" ]]; then
@@ -195,6 +201,7 @@ Debug:
     fi
     if [[ "$INITIALINSTALL" == "yes" ]]; then
       TESTSDISABLED="yes"
+      GITLABTESTSDISABLED="yes"
     fi
 
     DEPLOYSCRIPT="drupal-deploy"
-- 
GitLab