Maintenance: Split RSpec db_strategy:reset specs into dedicated CI Job to decrease overall runtime.

This commit is contained in:
Thorsten Eckel 2020-09-16 14:43:04 +02:00
parent 36a0fc98a6
commit 058272dc82
3 changed files with 25 additions and 4 deletions

View file

@ -9,7 +9,16 @@ include:
RAILS_ENV: "test" RAILS_ENV: "test"
script: script:
- bundle exec rake zammad:db:init - bundle exec rake zammad:db:init
- bundle exec rspec -t ~type:system -t ~searchindex - bundle exec rspec -t ~type:system -t ~searchindex -t ~db_strategy:reset
.template_rspec_db_reset: &template_rspec_db_reset
extends:
- .env_base
variables:
RAILS_ENV: "test"
script:
- bundle exec rake zammad:db:init
- bundle exec rspec -t ~type:system -t ~searchindex -t db_strategy:reset
# we need at least one job to store and include this template # we need at least one job to store and include this template
# $IGNORE is not defined # $IGNORE is not defined
@ -19,4 +28,4 @@ ignore:
variables: variables:
- $IGNORE - $IGNORE
script: script:
- '' - ''

View file

@ -2,4 +2,10 @@ rspec:mysql:
stage: test stage: test
extends: extends:
- .services_mysql - .services_mysql
- .template_rspec - .template_rspec
rspec:mysql:db_reset:
stage: test
extends:
- .services_mysql
- .template_rspec_db_reset

View file

@ -2,4 +2,10 @@ rspec:postgresql:
stage: test stage: test
extends: extends:
- .services_postgresql - .services_postgresql
- .template_rspec - .template_rspec
rspec:postgresql:db_reset:
stage: test
extends:
- .services_postgresql
- .template_rspec_db_reset