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

This commit is contained in:
Thorsten Eckel 2021-07-06 21:13:02 +02:00
parent 05e1ae82ff
commit 605f5f6fa2
3 changed files with 11 additions and 13 deletions

View file

@ -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

View file

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

View file

@ -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: