Maintenance: Reorganize CI 'test' stage for better overall CI performance.

This commit is contained in:
Martin Gruner 2022-02-09 09:37:15 +01:00
parent 98f789610a
commit a7861725a1
11 changed files with 35 additions and 73 deletions

View file

@ -131,11 +131,6 @@
- <<: *docker_redis
- <<: *docker_memcached
.services_mysql_postgresql: &services_mysql_postgresql
services:
- <<: *docker_mysql
- <<: *docker_postgresql
.services_mysql_postgresql_redis_memcached: &services_mysql_postgresql_redis_memcached
extends:
- .variables_redis_memcached

View file

@ -1,16 +1,12 @@
include:
- local: '/.gitlab/ci/integration/clearbit.yml'
- local: '/.gitlab/ci/integration/email_helper_deliver.yml'
- local: '/.gitlab/ci/integration/es.yml'
- local: '/.gitlab/ci/integration/geo.yml'
- local: '/.gitlab/ci/integration/other.yml'
- local: '/.gitlab/ci/integration/otrs.yml'
- local: '/.gitlab/ci/integration/slack.yml'
- local: '/.gitlab/ci/integration/user_agent.yml'
.template_integration: &template_integration
extends:
- .env_base
- .services_mysql_postgresql
- .services_mysql_postgresql_imap
- .rules_integration_manual_start
tags:
- integration

View file

@ -1,7 +0,0 @@
clearbit:
extends:
- .template_integration
script:
- bundle exec rake zammad:db:unseeded
- bundle exec rails test test/integration/clearbit_test.rb
allow_failure: true

View file

@ -1,11 +0,0 @@
email_helper_deliver:
extends:
- .template_integration
- .tags_mail
- .services_mysql_postgresql_imap
script:
- bundle exec rake zammad:db:unseeded
- bundle exec rails test test/integration/email_helper_test.rb
- bundle exec rails test test/integration/email_deliver_test.rb
- bundle exec rails test test/integration/email_keep_on_server_test.rb
- bundle exec rails test test/integration/email_postmaster_to_sender.rb

View file

@ -12,13 +12,13 @@
- bundle exec rails test test/integration/elasticsearch_test.rb
- bundle exec rspec --tag searchindex --tag ~type:system --profile 10
es:7:
"rspec:es:7":
<<: *template_integration_es
variables:
ELASTICSEARCH_TAG: '7'
RAILS_ENV: "test"
es:7.8:
"rspec:es:7.8":
<<: *template_integration_es
variables:
ELASTICSEARCH_TAG: '7.8.1'

View file

@ -1,8 +0,0 @@
geo:
extends:
- .template_integration
script:
- bundle exec rake zammad:db:unseeded
- bundle exec rails test test/integration/geo_calendar_test.rb
- bundle exec rails test test/integration/geo_location_test.rb
- bundle exec rails test test/integration/geo_ip_test.rb

View file

@ -0,0 +1,25 @@
"minitest:integration:other":
extends:
- .template_integration
script:
- bundle exec rake zammad:db:unseeded
- echo "email_helper_deliver tests..."
- bundle exec rails test test/integration/email_helper_test.rb
- bundle exec rails test test/integration/email_deliver_test.rb
- bundle exec rails test test/integration/email_keep_on_server_test.rb
- bundle exec rails test test/integration/email_postmaster_to_sender.rb
- echo "Clearbit test..."
- bundle exec rails test test/integration/clearbit_test.rb
- echo "Geo tests..."
- bundle exec rails test test/integration/geo_calendar_test.rb
- bundle exec rails test test/integration/geo_location_test.rb
- bundle exec rails test test/integration/geo_ip_test.rb
- echo "Slack test..."
- bundle exec rails test test/integration/slack_test.rb
- echo "UserAgent tests..."
- bundle exec rails test test/integration/user_agent_test.rb
- export ZAMMAD_PROXY_TEST=true
- bundle exec rails test test/integration/user_agent_test.rb
allow_failure: true

View file

@ -9,7 +9,7 @@
IMPORT_OTRS_ENDPOINT: "http://zammad-ci-otrsimport-app/otrs/public.pl?Action=ZammadMigrator"
TZ: "Europe/Berlin" # Required for the zammad-ci-otrsimport-app containers
otrs:6:
"minitest:integration:otrs:6":
<<: *template_integration_otrs
services:
- name: $CI_REGISTRY/docker/zammad-mysql:stable
@ -21,7 +21,7 @@ otrs:6:
- name: $CI_REGISTRY/docker/zammad-ci-otrsimport-app:otrs6
alias: zammad-ci-otrsimport-app
otrs:5:
"minitest:integration:otrs:5":
<<: *template_integration_otrs
services:
- name: $CI_REGISTRY/docker/zammad-mysql:stable
@ -33,7 +33,7 @@ otrs:5:
- name: $CI_REGISTRY/docker/zammad-ci-otrsimport-app:otrs5
alias: zammad-ci-otrsimport-app
otrs:4:
"minitest:integration:otrs:4":
<<: *template_integration_otrs
services:
- name: $CI_REGISTRY/docker/zammad-mysql:stable
@ -45,7 +45,7 @@ otrs:4:
- name: $CI_REGISTRY/docker/zammad-ci-otrsimport-app:otrs4
alias: zammad-ci-otrsimport-app
otrs:33:
"minitest:integration:otrs:33":
<<: *template_integration_otrs
services:
- name: $CI_REGISTRY/docker/zammad-mysql:stable
@ -57,7 +57,7 @@ otrs:33:
- name: $CI_REGISTRY/docker/zammad-ci-otrsimport-app:otrs33
alias: zammad-ci-otrsimport-app
otrs:32:
"minitest:integration:otrs:32":
<<: *template_integration_otrs
services:
- name: $CI_REGISTRY/docker/zammad-mysql:stable
@ -69,7 +69,7 @@ otrs:32:
- name: $CI_REGISTRY/docker/zammad-ci-otrsimport-app:otrs32
alias: zammad-ci-otrsimport-app
otrs:31:
"minitest:integration:otrs:31":
<<: *template_integration_otrs
services:
- name: $CI_REGISTRY/docker/zammad-mysql:stable

View file

@ -1,13 +0,0 @@
slack:
extends:
- .template_integration
rules:
- if: $CI_MERGE_REQUEST_ID
when: never
- if: '$CI_COMMIT_BRANCH =~ /^private/'
when: manual
allow_failure: true
- when: on_success
script:
- bundle exec rake zammad:db:unseeded
- bundle exec rails test test/integration/slack_test.rb

View file

@ -1,8 +0,0 @@
user_agent:
extends:
- .template_integration
script:
- bundle exec rake zammad:db:unseeded
- bundle exec rails test test/integration/user_agent_test.rb
- export ZAMMAD_PROXY_TEST=true
- bundle exec rails test test/integration/user_agent_test.rb

View file

@ -23,13 +23,6 @@ rspec:integration:
- .rules_integration_manual_start
variables:
RAILS_ENV: "test"
rules:
- if: $CI_MERGE_REQUEST_ID
when: never
- if: '$CI_COMMIT_BRANCH =~ /^private/ && $INTEGRATION_TESTS != "enabled"'
when: manual
allow_failure: true
- when: always
script:
- bundle exec rake zammad:db:init
- bundle exec rspec -t type:integration --profile 10