Browse Source

Maintenance: Run further integration tests only in non-private branches.

Thorsten Eckel 3 years ago
parent
commit
605f5f6fa2
3 changed files with 11 additions and 13 deletions
  1. 9 0
      .gitlab/ci/base.yml
  2. 1 0
      .gitlab/ci/integration.yml
  3. 1 13
      .gitlab/ci/rspec.yml

+ 9 - 0
.gitlab/ci/base.yml

@@ -158,6 +158,15 @@
     - <<: *docker_redis
     - <<: *docker_memcached
 
+.rules_integration_manual_start: &rules_integration_manual_start
+  rules:
+    - if: $CI_MERGE_REQUEST_ID
+      when: never
+    - if: '$CI_COMMIT_BRANCH =~ /^private/ && $INTEGRATION_TESTS == null'
+      when: manual
+      allow_failure: true
+    - when: on_success
+
 # we need at least one job to store and include this template
 # but we skip this via 'only' -> 'variables' -> '$IGNORE'
 # $IGNORE is not defined

+ 1 - 0
.gitlab/ci/integration.yml

@@ -12,6 +12,7 @@ include:
   extends:
     - .env_base
     - .services_mysql_postgresql
+    - .rules_integration_manual_start
   tags:
     - integration
   stage: test

+ 1 - 13
.gitlab/ci/rspec.yml

@@ -20,24 +20,12 @@ include:
     - bundle exec rake zammad:db:init
     - bundle exec rspec --exclude-pattern "spec/{system,integration}/**/*_spec.rb" -t ~searchindex -t db_strategy:reset
 
-# RSpec 3rd party integration tests are independent of the database
-# therefore we need only one job and choose a random database for each run
-
-.rspec_integration_rules: &rspec_integration_rules
-  rules:
-    - if: $CI_MERGE_REQUEST_ID
-      when: never
-    - if: '$CI_COMMIT_BRANCH =~ /^private/ && $INTEGRATION_TESTS == null'
-      when: manual
-      allow_failure: true
-    - when: on_success
-
 rspec:integration:
   stage: test
   extends:
     - .env_base
     - .services_mysql_postgresql_redis_memcached
-    - .rspec_integration_rules
+    - .rules_integration_manual_start
   variables:
     RAILS_ENV: "test"
   script: