From 058272dc824092f674f4506920f72ecde0ca68a4 Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Wed, 16 Sep 2020 14:43:04 +0200 Subject: [PATCH] Maintenance: Split RSpec db_strategy:reset specs into dedicated CI Job to decrease overall runtime. --- .gitlab/ci/rspec.yml | 13 +++++++++++-- .gitlab/ci/rspec/mysql.yml | 8 +++++++- .gitlab/ci/rspec/postgresql.yml | 8 +++++++- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/.gitlab/ci/rspec.yml b/.gitlab/ci/rspec.yml index ca77ef36d..3ee6d474f 100644 --- a/.gitlab/ci/rspec.yml +++ b/.gitlab/ci/rspec.yml @@ -9,7 +9,16 @@ include: RAILS_ENV: "test" script: - 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 # $IGNORE is not defined @@ -19,4 +28,4 @@ ignore: variables: - $IGNORE script: - - '' \ No newline at end of file + - '' diff --git a/.gitlab/ci/rspec/mysql.yml b/.gitlab/ci/rspec/mysql.yml index 00b06954b..2be6afec9 100644 --- a/.gitlab/ci/rspec/mysql.yml +++ b/.gitlab/ci/rspec/mysql.yml @@ -2,4 +2,10 @@ rspec:mysql: stage: test extends: - .services_mysql - - .template_rspec \ No newline at end of file + - .template_rspec + +rspec:mysql:db_reset: + stage: test + extends: + - .services_mysql + - .template_rspec_db_reset diff --git a/.gitlab/ci/rspec/postgresql.yml b/.gitlab/ci/rspec/postgresql.yml index 2d7c0665a..cba91ebc1 100644 --- a/.gitlab/ci/rspec/postgresql.yml +++ b/.gitlab/ci/rspec/postgresql.yml @@ -2,4 +2,10 @@ rspec:postgresql: stage: test extends: - .services_postgresql - - .template_rspec \ No newline at end of file + - .template_rspec + +rspec:postgresql:db_reset: + stage: test + extends: + - .services_postgresql + - .template_rspec_db_reset