2019-01-05 22:43:22 +00:00
|
|
|
image: registry.znuny.com/docker/zammad-ruby:2.4.4
|
2018-12-14 19:19:46 +00:00
|
|
|
|
|
|
|
# Global variables added to the ENV of each job
|
2018-10-01 17:41:17 +00:00
|
|
|
variables:
|
2018-12-14 19:19:46 +00:00
|
|
|
# for faster translation loading
|
2018-10-01 17:41:17 +00:00
|
|
|
Z_LOCALES: "en-us:de-de"
|
2018-12-14 19:19:46 +00:00
|
|
|
# Browser tests and variables
|
|
|
|
RAILS_SERVE_STATIC_FILES: "true"
|
|
|
|
REMOTE_URL: "http://selenium:24444/wd/hub"
|
|
|
|
TZ: "Europe/London"
|
|
|
|
# docker elgalu/selenium variables for parallel browser instance creation
|
|
|
|
MAX_INSTANCES: "50"
|
|
|
|
MAX_SESSIONS: "50"
|
|
|
|
# docker-imap-devel variables required for browser tests
|
|
|
|
MAILNAME: "mail.test.dc.zammad.com"
|
|
|
|
MAILBOX_INIT: "zammad@mail.test.dc.zammad.com:zammad"
|
|
|
|
MAIL_ADDRESS: "zammad@mail.test.dc.zammad.com"
|
|
|
|
MAIL_PASS: "zammad"
|
|
|
|
|
|
|
|
# Artifacts are stored for failed jobs for 2 days
|
2018-10-01 17:41:17 +00:00
|
|
|
.artifacts_error_template: &artifacts_error
|
|
|
|
artifacts:
|
|
|
|
expire_in: 2 days
|
|
|
|
when: on_failure
|
|
|
|
paths:
|
|
|
|
- tmp/screenshot*
|
2018-12-19 14:47:15 +00:00
|
|
|
- tmp/screenshots/*
|
2018-10-01 17:41:17 +00:00
|
|
|
- log/*.log
|
|
|
|
|
2018-12-14 19:19:46 +00:00
|
|
|
# Workaround to enable usage of mixed SSH and Docker GitLab CI runners
|
|
|
|
.docker_env_template: &docker_env
|
|
|
|
tags:
|
|
|
|
- docker
|
|
|
|
|
2019-01-20 14:36:34 +00:00
|
|
|
# Workaround for blocked port 25 access on cloud provider infrastructure
|
|
|
|
.requires_mail_port_access_template: &requires_mail_port_access
|
|
|
|
tags:
|
|
|
|
- mail
|
|
|
|
|
2018-12-14 19:19:46 +00:00
|
|
|
.base_env_template: &base_env
|
|
|
|
<<: *docker_env
|
|
|
|
<<: *artifacts_error
|
|
|
|
|
2019-03-26 09:56:21 +00:00
|
|
|
# General required Docker services for different/random DB envs
|
2018-12-14 19:19:46 +00:00
|
|
|
.services_mysql_template: &services_mysql
|
|
|
|
services:
|
|
|
|
- name: registry.znuny.com/docker/zammad-mysql:latest
|
|
|
|
alias: mysql
|
|
|
|
|
|
|
|
.services_postgresql_template: &services_postgresql
|
|
|
|
services:
|
|
|
|
- name: registry.znuny.com/docker/zammad-postgresql:latest
|
|
|
|
alias: postgresql
|
|
|
|
|
2019-03-26 09:56:21 +00:00
|
|
|
.services_random_db_template: &services_random_db
|
|
|
|
services:
|
|
|
|
- name: registry.znuny.com/docker/zammad-mysql:latest
|
|
|
|
alias: mysql
|
|
|
|
- name: registry.znuny.com/docker/zammad-postgresql:latest
|
|
|
|
alias: postgresql
|
|
|
|
|
2019-01-05 22:43:22 +00:00
|
|
|
# Cache gems in between jobs and pipelines
|
|
|
|
cache:
|
|
|
|
key: "ruby24"
|
|
|
|
paths:
|
|
|
|
- vendor/ruby
|
|
|
|
|
|
|
|
# Initialize application env
|
2015-11-22 14:58:06 +00:00
|
|
|
before_script:
|
2019-01-05 22:43:22 +00:00
|
|
|
- bundle install -j $(nproc) --path vendor
|
|
|
|
- bundle exec ruby script/build/database_config.rb
|
2015-11-22 14:58:06 +00:00
|
|
|
|
2019-01-05 22:43:22 +00:00
|
|
|
# Stages
|
2015-11-22 14:58:06 +00:00
|
|
|
stages:
|
2015-11-23 13:04:25 +00:00
|
|
|
- pre
|
2016-10-19 04:42:50 +00:00
|
|
|
- test
|
2017-09-27 08:38:59 +00:00
|
|
|
- browser-core
|
|
|
|
- browser-integration
|
2015-11-22 14:58:06 +00:00
|
|
|
|
2018-10-01 17:41:17 +00:00
|
|
|
# pre stage
|
|
|
|
|
2018-12-14 19:19:46 +00:00
|
|
|
# Workaround to enable usage of mixed SSH and Docker GitLab CI runners
|
|
|
|
.pre_stage_template: &pre_stage
|
|
|
|
<<: *docker_env
|
2015-11-23 13:04:25 +00:00
|
|
|
stage: pre
|
2019-01-05 22:43:22 +00:00
|
|
|
before_script:
|
|
|
|
- '' # disable before_script for pre "non-application" env
|
2018-12-14 19:19:46 +00:00
|
|
|
|
|
|
|
pre:rubocop:
|
|
|
|
<<: *pre_stage
|
2015-11-23 10:23:05 +00:00
|
|
|
script:
|
2019-01-05 22:43:22 +00:00
|
|
|
- bundle install -j $(nproc) --path vendor
|
2015-11-23 10:23:05 +00:00
|
|
|
- bundle exec rubocop
|
|
|
|
|
2016-05-20 15:17:53 +00:00
|
|
|
pre:coffeelint:
|
2018-12-14 19:19:46 +00:00
|
|
|
<<: *pre_stage
|
2015-11-29 23:24:48 +00:00
|
|
|
script:
|
|
|
|
- coffeelint app/
|
|
|
|
|
2016-05-20 15:17:53 +00:00
|
|
|
pre:bundle-audit:
|
2018-12-14 19:19:46 +00:00
|
|
|
<<: *pre_stage
|
2016-01-28 19:17:08 +00:00
|
|
|
script:
|
|
|
|
- gem install bundler-audit
|
|
|
|
- bundle-audit update
|
2018-09-12 04:26:09 +00:00
|
|
|
- bundle-audit
|
2016-01-28 19:17:08 +00:00
|
|
|
|
2016-08-21 14:55:51 +00:00
|
|
|
pre:github:
|
2018-12-14 19:19:46 +00:00
|
|
|
<<: *pre_stage
|
2016-08-21 15:12:34 +00:00
|
|
|
tags:
|
|
|
|
- deploy
|
2016-08-21 14:55:51 +00:00
|
|
|
script:
|
2016-10-19 03:14:44 +00:00
|
|
|
- script/build/sync_repo.sh git@github.com:zammad/zammad.git
|
2016-08-21 14:55:51 +00:00
|
|
|
|
2018-10-01 17:41:17 +00:00
|
|
|
# test stage
|
|
|
|
|
|
|
|
## RSpec
|
|
|
|
|
|
|
|
.script_rspec_template: &script_rspec_definition
|
2018-12-14 19:19:46 +00:00
|
|
|
<<: *base_env
|
2018-10-01 17:41:17 +00:00
|
|
|
variables:
|
|
|
|
RAILS_ENV: "test"
|
|
|
|
script:
|
2019-01-05 22:43:22 +00:00
|
|
|
- bundle exec rake zammad:db:init
|
2018-12-19 14:47:15 +00:00
|
|
|
- bundle exec rspec -t ~type:system
|
2018-10-01 17:41:17 +00:00
|
|
|
|
2016-11-25 17:01:41 +00:00
|
|
|
test:rspec:mysql:
|
|
|
|
stage: test
|
2018-12-14 19:19:46 +00:00
|
|
|
<<: *services_mysql
|
2018-10-01 17:41:17 +00:00
|
|
|
<<: *script_rspec_definition
|
2016-11-25 17:01:41 +00:00
|
|
|
|
|
|
|
test:rspec:postgresql:
|
|
|
|
stage: test
|
2018-12-14 19:19:46 +00:00
|
|
|
<<: *services_postgresql
|
2018-10-01 17:41:17 +00:00
|
|
|
<<: *script_rspec_definition
|
2016-11-25 17:01:41 +00:00
|
|
|
|
2018-10-01 17:41:17 +00:00
|
|
|
## Unit and Controller tests
|
|
|
|
|
|
|
|
.script_unit_template: &script_unit_definition
|
2018-12-14 19:19:46 +00:00
|
|
|
<<: *base_env
|
2018-10-01 17:41:17 +00:00
|
|
|
variables:
|
|
|
|
RAILS_ENV: "test"
|
2016-10-19 04:42:50 +00:00
|
|
|
script:
|
2019-01-05 22:43:22 +00:00
|
|
|
- bundle exec rake zammad:db:init
|
|
|
|
- bundle exec rake test:units
|
2019-02-26 12:01:27 +00:00
|
|
|
- bundle exec rails test test/integration/object_manager_test.rb
|
|
|
|
- bundle exec rails test test/integration/package_test.rb
|
2016-10-19 04:42:50 +00:00
|
|
|
|
2018-10-01 17:41:17 +00:00
|
|
|
test:unit:mysql:
|
|
|
|
stage: test
|
2018-12-14 19:19:46 +00:00
|
|
|
<<: *services_mysql
|
2018-10-01 17:41:17 +00:00
|
|
|
<<: *script_unit_definition
|
|
|
|
|
2016-10-19 04:42:50 +00:00
|
|
|
test:unit:postgresql:
|
|
|
|
stage: test
|
2018-12-14 19:19:46 +00:00
|
|
|
<<: *services_postgresql
|
2018-10-01 17:41:17 +00:00
|
|
|
<<: *script_unit_definition
|
|
|
|
|
|
|
|
## Integration tests
|
2016-10-19 04:42:50 +00:00
|
|
|
|
2018-12-14 19:19:46 +00:00
|
|
|
.test_integration_template: &test_integration_definition
|
|
|
|
<<: *base_env
|
2019-03-26 09:56:21 +00:00
|
|
|
<<: *services_random_db
|
2016-10-19 04:42:50 +00:00
|
|
|
stage: test
|
2018-10-01 17:41:17 +00:00
|
|
|
variables:
|
|
|
|
RAILS_ENV: "test"
|
2018-12-14 19:19:46 +00:00
|
|
|
|
|
|
|
test:integration:email_helper_deliver:
|
|
|
|
<<: *test_integration_definition
|
2019-01-20 14:36:34 +00:00
|
|
|
<<: *requires_mail_port_access
|
2016-10-19 04:42:50 +00:00
|
|
|
script:
|
2019-01-05 22:43:22 +00:00
|
|
|
- bundle exec rake zammad:db:unseeded
|
2019-02-26 12:01:27 +00:00
|
|
|
- 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
|
2017-07-20 12:01:14 +00:00
|
|
|
|
2016-10-19 04:42:50 +00:00
|
|
|
test:integration:facebook:
|
2018-12-14 19:19:46 +00:00
|
|
|
<<: *test_integration_definition
|
2016-10-19 04:42:50 +00:00
|
|
|
script:
|
2019-01-05 22:43:22 +00:00
|
|
|
- bundle exec rake zammad:db:init
|
2019-02-26 12:01:27 +00:00
|
|
|
- bundle exec rails test test/integration/facebook_test.rb
|
2016-10-19 04:42:50 +00:00
|
|
|
allow_failure: true
|
|
|
|
|
2018-04-30 12:51:18 +00:00
|
|
|
test:integration:geo:
|
2018-12-14 19:19:46 +00:00
|
|
|
<<: *test_integration_definition
|
2016-10-19 04:42:50 +00:00
|
|
|
script:
|
2019-01-05 22:43:22 +00:00
|
|
|
- bundle exec rake zammad:db:unseeded
|
2019-02-26 12:01:27 +00:00
|
|
|
- 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
|
2016-10-19 04:42:50 +00:00
|
|
|
|
|
|
|
test:integration:user_agent:
|
2018-12-14 19:19:46 +00:00
|
|
|
<<: *test_integration_definition
|
2016-10-19 04:42:50 +00:00
|
|
|
script:
|
2019-01-05 22:43:22 +00:00
|
|
|
- bundle exec rake zammad:db:unseeded
|
2019-02-26 12:01:27 +00:00
|
|
|
- bundle exec rails test test/integration/user_agent_test.rb
|
2017-01-16 00:24:56 +00:00
|
|
|
- export ZAMMAD_PROXY_TEST=true
|
2019-02-26 12:01:27 +00:00
|
|
|
- bundle exec rails test test/integration/user_agent_test.rb
|
2018-04-30 12:51:18 +00:00
|
|
|
allow_failure: true
|
2016-10-19 04:42:50 +00:00
|
|
|
|
|
|
|
test:integration:slack:
|
2018-12-14 19:19:46 +00:00
|
|
|
<<: *test_integration_definition
|
2016-10-19 04:42:50 +00:00
|
|
|
script:
|
2019-01-05 22:43:22 +00:00
|
|
|
- bundle exec rake zammad:db:unseeded
|
2016-10-19 04:42:50 +00:00
|
|
|
- echo "gem 'slack-api'" >> Gemfile.local
|
2018-10-01 17:41:17 +00:00
|
|
|
- bundle install -j $(nproc)
|
2019-02-26 12:01:27 +00:00
|
|
|
- bundle exec rails test test/integration/slack_test.rb
|
2016-10-19 04:42:50 +00:00
|
|
|
|
|
|
|
test:integration:clearbit:
|
2018-12-14 19:19:46 +00:00
|
|
|
<<: *test_integration_definition
|
2016-10-19 04:42:50 +00:00
|
|
|
script:
|
2019-01-05 22:43:22 +00:00
|
|
|
- bundle exec rake zammad:db:unseeded
|
2019-02-26 12:01:27 +00:00
|
|
|
- bundle exec rails test test/integration/clearbit_test.rb
|
2018-02-07 10:50:19 +00:00
|
|
|
allow_failure: true
|
2016-10-19 04:42:50 +00:00
|
|
|
|
2018-10-01 17:41:17 +00:00
|
|
|
### Elasticsearch
|
|
|
|
|
2019-03-26 09:56:21 +00:00
|
|
|
test:integration:es:
|
2018-12-14 19:19:46 +00:00
|
|
|
<<: *base_env
|
2016-10-19 04:42:50 +00:00
|
|
|
stage: test
|
2019-03-26 09:56:21 +00:00
|
|
|
services:
|
|
|
|
- name: registry.znuny.com/docker/zammad-mysql:latest
|
|
|
|
alias: mysql
|
|
|
|
- name: registry.znuny.com/docker/zammad-postgresql:latest
|
|
|
|
alias: postgresql
|
|
|
|
- name: registry.znuny.com/docker/zammad-elasticsearch:latest
|
|
|
|
alias: elasticsearch
|
2018-10-01 17:41:17 +00:00
|
|
|
variables:
|
|
|
|
RAILS_ENV: "test"
|
|
|
|
ES_INDEX_RAND: "true"
|
2018-12-14 19:19:46 +00:00
|
|
|
ES_URL: "http://elasticsearch:9200"
|
2016-10-19 04:42:50 +00:00
|
|
|
script:
|
2019-01-05 22:43:22 +00:00
|
|
|
- bundle exec rake zammad:db:unseeded
|
2019-02-26 12:01:27 +00:00
|
|
|
- bundle exec rails test test/integration/elasticsearch_active_test.rb
|
|
|
|
- bundle exec rails test test/integration/elasticsearch_test.rb
|
2018-09-19 13:54:49 +00:00
|
|
|
- bundle exec rspec --tag searchindex
|
2019-04-17 06:26:26 +00:00
|
|
|
- bundle exec rails test test/integration/report_test.rb
|
2016-10-19 04:42:50 +00:00
|
|
|
|
2018-10-01 17:41:17 +00:00
|
|
|
### Zendesk
|
|
|
|
|
2019-03-26 09:56:21 +00:00
|
|
|
test:integration:zendesk:
|
2018-12-14 19:19:46 +00:00
|
|
|
<<: *base_env
|
2019-03-26 09:56:21 +00:00
|
|
|
<<: *services_random_db
|
2018-10-01 17:41:17 +00:00
|
|
|
stage: test
|
|
|
|
variables:
|
|
|
|
RAILS_ENV: "test"
|
2016-10-19 04:42:50 +00:00
|
|
|
script:
|
2019-01-05 22:43:22 +00:00
|
|
|
- bundle exec rake zammad:db:unseeded
|
2019-02-26 12:01:27 +00:00
|
|
|
- bundle exec rails test test/integration/zendesk_import_test.rb
|
2018-10-01 17:41:17 +00:00
|
|
|
allow_failure: true
|
2016-10-19 04:42:50 +00:00
|
|
|
|
2018-10-01 17:41:17 +00:00
|
|
|
### OTRS
|
|
|
|
|
|
|
|
.script_integration_otrs_template: &script_integration_otrs_definition
|
2018-12-14 19:19:46 +00:00
|
|
|
<<: *base_env
|
2019-03-26 09:56:21 +00:00
|
|
|
<<: *services_random_db
|
2018-10-01 17:41:17 +00:00
|
|
|
stage: test
|
2016-10-19 04:42:50 +00:00
|
|
|
script:
|
2019-01-05 22:43:22 +00:00
|
|
|
- bundle exec rake zammad:db:unseeded
|
2019-02-26 12:01:27 +00:00
|
|
|
- bundle exec rails test test/integration/otrs_import_test.rb
|
2018-10-01 17:41:17 +00:00
|
|
|
|
2019-03-26 09:56:21 +00:00
|
|
|
test:integration:otrs_6:
|
|
|
|
<<: *script_integration_otrs_definition
|
2018-10-01 17:41:17 +00:00
|
|
|
variables:
|
|
|
|
RAILS_ENV: "test"
|
|
|
|
IMPORT_OTRS_ENDPOINT: "https://vz1185.test.znuny.com/otrs/public.pl?Action=ZammadMigrator"
|
2016-10-19 04:42:50 +00:00
|
|
|
|
2018-01-05 14:43:58 +00:00
|
|
|
test:integration:otrs_5:
|
2019-03-26 09:56:21 +00:00
|
|
|
<<: *script_integration_otrs_definition
|
2018-10-01 17:41:17 +00:00
|
|
|
variables:
|
|
|
|
RAILS_ENV: "test"
|
|
|
|
IMPORT_OTRS_ENDPOINT: "http://vz1109.demo.znuny.com/otrs/public.pl?Action=ZammadMigrator"
|
2016-10-19 04:42:50 +00:00
|
|
|
|
|
|
|
test:integration:otrs_4:
|
2019-03-26 09:56:21 +00:00
|
|
|
<<: *script_integration_otrs_definition
|
2018-10-01 17:41:17 +00:00
|
|
|
variables:
|
|
|
|
RAILS_ENV: "test"
|
|
|
|
IMPORT_OTRS_ENDPOINT: "http://vz383.demo.znuny.com/otrs/public.pl?Action=ZammadMigrator"
|
2016-10-19 04:42:50 +00:00
|
|
|
|
|
|
|
test:integration:otrs_33:
|
2019-03-26 09:56:21 +00:00
|
|
|
<<: *script_integration_otrs_definition
|
2018-10-01 17:41:17 +00:00
|
|
|
variables:
|
|
|
|
RAILS_ENV: "test"
|
|
|
|
IMPORT_OTRS_ENDPOINT: "http://vz305.demo.znuny.com/otrs/public.pl?Action=ZammadMigrator"
|
2016-10-19 04:42:50 +00:00
|
|
|
|
|
|
|
test:integration:otrs_32:
|
2019-03-26 09:56:21 +00:00
|
|
|
<<: *script_integration_otrs_definition
|
2018-10-01 17:41:17 +00:00
|
|
|
variables:
|
|
|
|
RAILS_ENV: "test"
|
|
|
|
IMPORT_OTRS_ENDPOINT: "http://vz382.demo.znuny.com/otrs/public.pl?Action=ZammadMigrator"
|
2016-10-19 04:42:50 +00:00
|
|
|
|
|
|
|
test:integration:otrs_31:
|
2019-03-26 09:56:21 +00:00
|
|
|
<<: *script_integration_otrs_definition
|
2018-10-01 17:41:17 +00:00
|
|
|
variables:
|
|
|
|
RAILS_ENV: "test"
|
|
|
|
IMPORT_OTRS_ENDPOINT: "http://vz381.demo.znuny.com/otrs/public.pl?Action=ZammadMigrator"
|
|
|
|
|
|
|
|
# Browser tests
|
|
|
|
|
|
|
|
## preparation (asset precompile)
|
2016-10-19 04:42:50 +00:00
|
|
|
|
|
|
|
browser:build:
|
2018-12-14 19:19:46 +00:00
|
|
|
<<: *base_env
|
|
|
|
<<: *services_postgresql
|
2016-10-19 04:42:50 +00:00
|
|
|
stage: test
|
2018-10-01 17:41:17 +00:00
|
|
|
variables:
|
|
|
|
RAILS_ENV: "production"
|
2016-10-19 04:42:50 +00:00
|
|
|
script:
|
2019-01-05 22:43:22 +00:00
|
|
|
- bundle exec rake zammad:db:unseeded
|
|
|
|
- bundle exec rake assets:precompile
|
2016-10-19 04:42:50 +00:00
|
|
|
artifacts:
|
2017-05-23 06:02:59 +00:00
|
|
|
expire_in: 1 week
|
2016-10-19 04:42:50 +00:00
|
|
|
paths:
|
|
|
|
- public/assets/.sprockets-manifest*
|
|
|
|
- public/assets/application-*
|
|
|
|
- public/assets/print-*
|
|
|
|
|
2019-03-26 00:26:59 +00:00
|
|
|
.services_browser_template: &services_browser_definition
|
2018-12-19 14:47:15 +00:00
|
|
|
services:
|
|
|
|
- name: registry.znuny.com/docker/zammad-mysql:latest
|
|
|
|
alias: mysql
|
2019-03-26 00:26:59 +00:00
|
|
|
- name: registry.znuny.com/docker/zammad-postgresql:latest
|
|
|
|
alias: postgresql
|
2018-12-19 14:47:15 +00:00
|
|
|
- name: registry.znuny.com/docker/zammad-elasticsearch:latest
|
|
|
|
alias: elasticsearch
|
2019-03-07 08:31:55 +00:00
|
|
|
- name: docker.io/elgalu/selenium:3.14.0-p17
|
2018-12-19 14:47:15 +00:00
|
|
|
alias: selenium
|
|
|
|
- name: registry.znuny.com/docker/docker-imap-devel:latest
|
|
|
|
alias: mail
|
|
|
|
|
2019-01-24 08:58:58 +00:00
|
|
|
## Browser core tests
|
2018-12-19 14:47:15 +00:00
|
|
|
|
2019-01-24 08:58:58 +00:00
|
|
|
.variables_browser_template: &variables_browser_definition
|
|
|
|
RAILS_ENV: "production"
|
|
|
|
APP_RESTART_CMD: "bundle exec rake zammad:ci:app:restart"
|
|
|
|
|
|
|
|
.test_browser_core_template: &test_browser_core_definition
|
2018-12-19 14:47:15 +00:00
|
|
|
<<: *base_env
|
|
|
|
stage: browser-core
|
2019-01-24 08:58:58 +00:00
|
|
|
dependencies:
|
|
|
|
- browser:build
|
|
|
|
|
|
|
|
## Capybara
|
|
|
|
|
|
|
|
.test_capybara_template: &test_capybara_definition
|
|
|
|
<<: *test_browser_core_definition
|
2018-12-19 14:47:15 +00:00
|
|
|
script:
|
2019-01-05 22:43:22 +00:00
|
|
|
- bundle exec rake zammad:ci:test:prepare[with_elasticsearch]
|
2018-12-19 14:47:15 +00:00
|
|
|
- bundle exec rspec --fail-fast -t type:system
|
|
|
|
|
|
|
|
.variables_capybara_chrome_template: &variables_capybara_chrome_definition
|
|
|
|
<<: *test_capybara_definition
|
|
|
|
variables:
|
|
|
|
RAILS_ENV: "test"
|
|
|
|
BROWSER: "chrome"
|
|
|
|
|
|
|
|
.variables_capybara_ff_template: &variables_capybara_ff_definition
|
|
|
|
<<: *test_capybara_definition
|
|
|
|
variables:
|
|
|
|
RAILS_ENV: "test"
|
|
|
|
BROWSER: "firefox"
|
|
|
|
|
2019-03-26 00:26:59 +00:00
|
|
|
test:browser:core:capybara_chrome:
|
2018-12-19 14:47:15 +00:00
|
|
|
<<: *variables_capybara_chrome_definition
|
2019-03-26 00:26:59 +00:00
|
|
|
<<: *services_browser_definition
|
2018-12-19 14:47:15 +00:00
|
|
|
|
2019-03-26 00:26:59 +00:00
|
|
|
test:browser:core:capybara_ff:
|
2018-12-19 14:47:15 +00:00
|
|
|
<<: *variables_capybara_ff_definition
|
2019-03-26 00:26:59 +00:00
|
|
|
<<: *services_browser_definition
|
2018-10-01 17:41:17 +00:00
|
|
|
|
|
|
|
### API clients
|
|
|
|
|
|
|
|
test:browser:integration:api_client_ruby:
|
|
|
|
<<: *test_browser_core_definition
|
2019-03-26 09:56:21 +00:00
|
|
|
<<: *services_random_db
|
2018-10-01 17:41:17 +00:00
|
|
|
variables:
|
|
|
|
<<: *variables_browser_definition
|
2016-10-19 04:42:50 +00:00
|
|
|
script:
|
2019-01-05 22:43:22 +00:00
|
|
|
- RAILS_ENV=test bundle exec rake db:create
|
2016-10-19 04:42:50 +00:00
|
|
|
- cp contrib/auto_wizard_test.json auto_wizard.json
|
2019-01-05 22:43:22 +00:00
|
|
|
- bundle exec rake zammad:ci:test:start
|
2018-12-14 19:19:46 +00:00
|
|
|
- git clone https://github.com/zammad/zammad-api-client-ruby.git
|
2016-11-07 12:07:44 +00:00
|
|
|
- cd zammad-api-client-ruby
|
2018-10-01 17:41:17 +00:00
|
|
|
- bundle install -j $(nproc)
|
2018-12-14 19:19:46 +00:00
|
|
|
- bundle exec rspec
|
2016-10-19 04:42:50 +00:00
|
|
|
|
|
|
|
test:browser:integration:api_client_php:
|
2018-10-01 17:41:17 +00:00
|
|
|
<<: *test_browser_core_definition
|
2019-03-26 09:56:21 +00:00
|
|
|
<<: *services_random_db
|
2018-10-01 17:41:17 +00:00
|
|
|
variables:
|
|
|
|
<<: *variables_browser_definition
|
2018-12-14 19:19:46 +00:00
|
|
|
ZAMMAD_PHP_API_CLIENT_UNIT_TESTS_URL: "http://localhost:3000"
|
2018-10-01 17:41:17 +00:00
|
|
|
ZAMMAD_PHP_API_CLIENT_UNIT_TESTS_USERNAME: "master@example.com"
|
|
|
|
ZAMMAD_PHP_API_CLIENT_UNIT_TESTS_PASSWORD: "test"
|
2016-10-19 04:42:50 +00:00
|
|
|
script:
|
2019-01-05 22:43:22 +00:00
|
|
|
- RAILS_ENV=test bundle exec rake db:create
|
|
|
|
- bundle exec rake zammad:ci:test:start zammad:setup:auto_wizard
|
2018-12-14 19:19:46 +00:00
|
|
|
- git clone https://github.com/zammad/zammad-api-client-php.git
|
|
|
|
- php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
|
|
|
- php composer-setup.php --install-dir=/usr/local/bin
|
|
|
|
- ln -s /usr/local/bin/composer.phar /usr/local/bin/composer
|
2016-10-19 04:42:50 +00:00
|
|
|
- cd zammad-api-client-php
|
|
|
|
- composer install
|
2018-12-14 19:19:46 +00:00
|
|
|
- vendor/bin/phpunit
|
2016-10-19 04:42:50 +00:00
|
|
|
|
2018-10-01 17:41:17 +00:00
|
|
|
### Browser test slices
|
2016-10-19 04:42:50 +00:00
|
|
|
|
2018-10-01 17:41:17 +00:00
|
|
|
#### Templates
|
2016-10-19 04:42:50 +00:00
|
|
|
|
2018-10-01 17:41:17 +00:00
|
|
|
.script_browser_slice_template: &script_browser_slice_definition
|
2016-10-19 04:42:50 +00:00
|
|
|
script:
|
2018-10-01 17:41:17 +00:00
|
|
|
# temporary workaround to check Yahoo! mailbox only in test:browser:core:ff_3_* tests
|
|
|
|
- if [[ $CI_JOB_NAME != test:browser:core:ff_3_* ]]; then unset MAILBOX_AUTO1 ; fi
|
|
|
|
- if [[ $CI_JOB_NAME != test:browser:core:ff_3_* ]]; then unset MAILBOX_AUTO2 ; fi
|
|
|
|
- if [[ $CI_JOB_NAME != test:browser:core:ff_3_* ]]; then unset MAILBOX_MANUAL1 ; fi
|
|
|
|
- if [[ $CI_JOB_NAME != test:browser:core:ff_3_* ]]; then unset MAILBOX_MANUAL2 ; fi
|
|
|
|
- env
|
|
|
|
- script/build/test_slice_tests.sh $TEST_SLICE
|
2019-01-05 22:43:22 +00:00
|
|
|
- RAILS_ENV=test bundle exec rake db:create
|
|
|
|
- bundle exec rake zammad:ci:test:start[with_elasticsearch]
|
2019-02-26 12:01:27 +00:00
|
|
|
- time bundle exec rails test --fail-fast test/browser
|
2016-10-19 04:42:50 +00:00
|
|
|
|
2019-03-26 00:26:59 +00:00
|
|
|
.test_browser_core_base_template: &test_browser_core_base_definition
|
2018-10-01 17:41:17 +00:00
|
|
|
<<: *test_browser_core_definition
|
|
|
|
<<: *script_browser_slice_definition
|
2019-03-26 00:26:59 +00:00
|
|
|
<<: *services_browser_definition
|
2018-10-01 17:41:17 +00:00
|
|
|
|
|
|
|
#### Firefox
|
|
|
|
|
2019-03-26 00:26:59 +00:00
|
|
|
test:browser:core:ff_1:
|
|
|
|
<<: *test_browser_core_base_definition
|
2018-10-01 17:41:17 +00:00
|
|
|
variables:
|
|
|
|
<<: *variables_browser_definition
|
|
|
|
BROWSER: "firefox"
|
|
|
|
TEST_SLICE: "1"
|
|
|
|
|
2019-03-26 00:26:59 +00:00
|
|
|
test:browser:core:ff_2:
|
|
|
|
<<: *test_browser_core_base_definition
|
2018-10-01 17:41:17 +00:00
|
|
|
variables:
|
|
|
|
<<: *variables_browser_definition
|
|
|
|
BROWSER: "firefox"
|
|
|
|
TEST_SLICE: "2"
|
2016-10-19 04:42:50 +00:00
|
|
|
|
2019-03-26 00:26:59 +00:00
|
|
|
test:browser:core:ff_3:
|
|
|
|
<<: *test_browser_core_base_definition
|
2019-01-20 14:36:34 +00:00
|
|
|
<<: *requires_mail_port_access
|
2018-10-01 17:41:17 +00:00
|
|
|
variables:
|
|
|
|
<<: *variables_browser_definition
|
|
|
|
BROWSER: "firefox"
|
|
|
|
TEST_SLICE: "3"
|
2016-10-19 04:42:50 +00:00
|
|
|
|
2019-03-26 00:26:59 +00:00
|
|
|
test:browser:core:ff_4:
|
|
|
|
<<: *test_browser_core_base_definition
|
2018-10-01 17:41:17 +00:00
|
|
|
variables:
|
|
|
|
<<: *variables_browser_definition
|
|
|
|
BROWSER: "firefox"
|
|
|
|
TEST_SLICE: "4"
|
2016-10-19 04:42:50 +00:00
|
|
|
|
2019-03-26 00:26:59 +00:00
|
|
|
test:browser:core:ff_5:
|
|
|
|
<<: *test_browser_core_base_definition
|
2018-10-01 17:41:17 +00:00
|
|
|
variables:
|
|
|
|
<<: *variables_browser_definition
|
|
|
|
BROWSER: "firefox"
|
|
|
|
TEST_SLICE: "5"
|
2016-10-19 04:42:50 +00:00
|
|
|
|
2019-03-26 00:26:59 +00:00
|
|
|
test:browser:core:ff_6:
|
|
|
|
<<: *test_browser_core_base_definition
|
2018-10-01 17:41:17 +00:00
|
|
|
variables:
|
|
|
|
<<: *variables_browser_definition
|
|
|
|
BROWSER: "firefox"
|
|
|
|
TEST_SLICE: "6"
|
|
|
|
|
|
|
|
### Chrome
|
2016-10-19 04:42:50 +00:00
|
|
|
|
2019-03-26 00:26:59 +00:00
|
|
|
test:browser:core:chrome_1:
|
|
|
|
<<: *test_browser_core_base_definition
|
2018-10-01 17:41:17 +00:00
|
|
|
variables:
|
|
|
|
<<: *variables_browser_definition
|
|
|
|
BROWSER: "chrome"
|
|
|
|
TEST_SLICE: "1"
|
2016-10-19 04:42:50 +00:00
|
|
|
|
2019-03-26 00:26:59 +00:00
|
|
|
test:browser:core:chrome_2:
|
|
|
|
<<: *test_browser_core_base_definition
|
2018-10-01 17:41:17 +00:00
|
|
|
variables:
|
|
|
|
<<: *variables_browser_definition
|
|
|
|
BROWSER: "chrome"
|
|
|
|
TEST_SLICE: "2"
|
2016-10-19 04:42:50 +00:00
|
|
|
|
2019-03-26 00:26:59 +00:00
|
|
|
test:browser:core:chrome_3:
|
|
|
|
<<: *test_browser_core_base_definition
|
2018-10-01 17:41:17 +00:00
|
|
|
variables:
|
|
|
|
<<: *variables_browser_definition
|
|
|
|
BROWSER: "chrome"
|
|
|
|
TEST_SLICE: "3"
|
2016-10-19 04:42:50 +00:00
|
|
|
|
2019-03-26 00:26:59 +00:00
|
|
|
test:browser:core:chrome_4:
|
|
|
|
<<: *test_browser_core_base_definition
|
2018-10-01 17:41:17 +00:00
|
|
|
variables:
|
|
|
|
<<: *variables_browser_definition
|
|
|
|
BROWSER: "chrome"
|
|
|
|
TEST_SLICE: "4"
|
2016-10-19 04:42:50 +00:00
|
|
|
|
2019-03-26 00:26:59 +00:00
|
|
|
test:browser:core:chrome_5:
|
|
|
|
<<: *test_browser_core_base_definition
|
2018-10-01 17:41:17 +00:00
|
|
|
variables:
|
|
|
|
<<: *variables_browser_definition
|
|
|
|
BROWSER: "chrome"
|
|
|
|
TEST_SLICE: "5"
|
2016-10-19 04:42:50 +00:00
|
|
|
|
2019-03-26 00:26:59 +00:00
|
|
|
test:browser:core:chrome_6:
|
|
|
|
<<: *test_browser_core_base_definition
|
2018-10-01 17:41:17 +00:00
|
|
|
variables:
|
|
|
|
<<: *variables_browser_definition
|
|
|
|
BROWSER: "chrome"
|
|
|
|
TEST_SLICE: "6"
|
|
|
|
|
|
|
|
### Auto wizard
|
|
|
|
|
2018-12-14 19:19:46 +00:00
|
|
|
.auto_wizard_services_template: &auto_wizard_services
|
|
|
|
services:
|
|
|
|
- name: registry.znuny.com/docker/zammad-postgresql:latest
|
|
|
|
alias: postgresql
|
2019-03-07 08:31:55 +00:00
|
|
|
- name: docker.io/elgalu/selenium:3.14.0-p17
|
2018-12-14 19:19:46 +00:00
|
|
|
alias: selenium
|
|
|
|
|
2018-10-01 17:41:17 +00:00
|
|
|
.test_browser_integration_template: &test_browser_integration_definition
|
2018-12-14 19:19:46 +00:00
|
|
|
<<: *base_env
|
|
|
|
<<: *auto_wizard_services
|
2018-10-01 17:41:17 +00:00
|
|
|
stage: browser-integration
|
2016-10-19 04:42:50 +00:00
|
|
|
dependencies:
|
|
|
|
- browser:build
|
2018-10-01 17:41:17 +00:00
|
|
|
|
|
|
|
.script_integration_auto_wizard_template: &script_integration_auto_wizard_definition
|
2016-10-19 04:42:50 +00:00
|
|
|
script:
|
2019-01-05 22:43:22 +00:00
|
|
|
- RAILS_ENV=test bundle exec rake db:create
|
2018-10-01 17:41:17 +00:00
|
|
|
- cp $AUTO_WIZARD_FILE auto_wizard.json
|
2019-01-05 22:43:22 +00:00
|
|
|
- bundle exec rake zammad:ci:test:start
|
2019-02-26 12:01:27 +00:00
|
|
|
- bundle exec rails test $TEST_FILE
|
2018-10-01 17:41:17 +00:00
|
|
|
|
|
|
|
.browser_core_auto_wizard_template: &browser_core_auto_wizard_definition
|
|
|
|
<<: *test_browser_core_definition
|
2018-12-14 19:19:46 +00:00
|
|
|
<<: *auto_wizard_services
|
2018-10-01 17:41:17 +00:00
|
|
|
<<: *script_integration_auto_wizard_definition
|
2016-10-19 04:42:50 +00:00
|
|
|
|
2017-09-27 08:38:59 +00:00
|
|
|
test:browser:autowizard_chrome:
|
2018-10-01 17:41:17 +00:00
|
|
|
<<: *browser_core_auto_wizard_definition
|
|
|
|
variables:
|
|
|
|
<<: *variables_browser_definition
|
|
|
|
BROWSER: "chrome"
|
|
|
|
AUTO_WIZARD_FILE: "contrib/auto_wizard_example.json"
|
|
|
|
TEST_FILE: "test/integration/auto_wizard_browser_test.rb"
|
|
|
|
|
|
|
|
test:browser:autowizard_ff:
|
|
|
|
<<: *browser_core_auto_wizard_definition
|
|
|
|
variables:
|
|
|
|
<<: *variables_browser_definition
|
|
|
|
BROWSER: "firefox"
|
|
|
|
AUTO_WIZARD_FILE: "contrib/auto_wizard_example.json"
|
|
|
|
TEST_FILE: "test/integration/auto_wizard_browser_test.rb"
|
|
|
|
|
|
|
|
### Browser integration tests
|
|
|
|
|
|
|
|
.browser_integration_auto_wizard_template: &browser_integration_auto_wizard_definition
|
|
|
|
<<: *test_browser_integration_definition
|
|
|
|
<<: *script_integration_auto_wizard_definition
|
2016-10-19 04:42:50 +00:00
|
|
|
|
2017-09-27 08:38:59 +00:00
|
|
|
test:browser:integration:twitter_chrome:
|
2018-10-01 17:41:17 +00:00
|
|
|
<<: *browser_integration_auto_wizard_definition
|
|
|
|
variables:
|
|
|
|
<<: *variables_browser_definition
|
|
|
|
BROWSER: "chrome"
|
|
|
|
AUTO_WIZARD_FILE: "contrib/auto_wizard_test.json"
|
|
|
|
TEST_FILE: "test/integration/twitter_browser_test.rb"
|
2016-10-19 04:42:50 +00:00
|
|
|
|
2018-10-01 17:41:17 +00:00
|
|
|
test:browser:integration:twitter_ff:
|
|
|
|
<<: *browser_integration_auto_wizard_definition
|
|
|
|
variables:
|
|
|
|
<<: *variables_browser_definition
|
|
|
|
BROWSER: "firefox"
|
|
|
|
AUTO_WIZARD_FILE: "contrib/auto_wizard_test.json"
|
|
|
|
TEST_FILE: "test/integration/twitter_browser_test.rb"
|
2016-10-19 04:42:50 +00:00
|
|
|
|
2018-10-01 17:41:17 +00:00
|
|
|
test:browser:integration:facebook_chrome:
|
|
|
|
<<: *browser_integration_auto_wizard_definition
|
|
|
|
variables:
|
|
|
|
<<: *variables_browser_definition
|
|
|
|
BROWSER: "chrome"
|
|
|
|
AUTO_WIZARD_FILE: "contrib/auto_wizard_test.json"
|
|
|
|
TEST_FILE: "test/integration/facebook_browser_test.rb"
|
2016-10-19 04:42:50 +00:00
|
|
|
|
2018-10-01 17:41:17 +00:00
|
|
|
test:browser:integration:facebook_ff:
|
|
|
|
<<: *browser_integration_auto_wizard_definition
|
|
|
|
variables:
|
|
|
|
<<: *variables_browser_definition
|
|
|
|
BROWSER: "firefox"
|
|
|
|
AUTO_WIZARD_FILE: "contrib/auto_wizard_test.json"
|
|
|
|
TEST_FILE: "test/integration/facebook_browser_test.rb"
|
2018-07-26 14:24:31 +00:00
|
|
|
|
|
|
|
test:browser:integration:idoit_chrome:
|
2018-10-01 17:41:17 +00:00
|
|
|
<<: *browser_integration_auto_wizard_definition
|
|
|
|
variables:
|
|
|
|
<<: *variables_browser_definition
|
|
|
|
BROWSER: "chrome"
|
|
|
|
AUTO_WIZARD_FILE: "contrib/auto_wizard_test.json"
|
|
|
|
TEST_FILE: "test/integration/idoit_browser_test.rb"
|
|
|
|
|
|
|
|
### Browser integration tests
|
|
|
|
|
|
|
|
.variables_browser_import_template: &variables_browser_import_definition
|
|
|
|
BROWSER: "chrome"
|
2018-12-14 19:19:46 +00:00
|
|
|
RAILS_SERVE_STATIC_FILES: "true"
|
|
|
|
RAILS_ENV: "production"
|
2018-10-01 17:41:17 +00:00
|
|
|
|
|
|
|
.browser_integration_import_template: &browser_integration_import_definition
|
|
|
|
<<: *test_browser_integration_definition
|
2018-07-26 14:24:31 +00:00
|
|
|
script:
|
2019-01-05 22:43:22 +00:00
|
|
|
- RAILS_ENV=test bundle exec rake db:create
|
|
|
|
- bundle exec rake zammad:ci:test:start
|
2019-02-26 12:01:27 +00:00
|
|
|
- bundle exec rails test $TEST_FILE
|
2018-10-01 17:41:17 +00:00
|
|
|
|
|
|
|
test:browser:integration:otrs_chrome:
|
|
|
|
<<: *browser_integration_import_definition
|
|
|
|
variables:
|
|
|
|
<<: *variables_browser_import_definition
|
|
|
|
TEST_FILE: "test/integration/otrs_import_browser_test.rb"
|
|
|
|
|
|
|
|
test:browser:integration:zendesk_chrome:
|
|
|
|
<<: *browser_integration_import_definition
|
|
|
|
variables:
|
|
|
|
<<: *variables_browser_import_definition
|
|
|
|
TEST_FILE: "test/integration/zendesk_import_browser_test.rb"
|