.gitlab-ci.yml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743
  1. image: registry.znuny.com/docker/zammad-ruby:2.4.4
  2. # Global variables added to the ENV of each job
  3. variables:
  4. # for faster translation loading
  5. Z_LOCALES: "en-us:de-de"
  6. # Browser tests and variables
  7. RAILS_SERVE_STATIC_FILES: "true"
  8. REMOTE_URL: "http://selenium:24444/wd/hub"
  9. TZ: "Europe/London"
  10. # docker elgalu/selenium variables for parallel browser instance creation
  11. MAX_INSTANCES: "50"
  12. MAX_SESSIONS: "50"
  13. # docker-imap-devel variables required for browser tests
  14. MAILNAME: "mail.test.dc.zammad.com"
  15. MAILBOX_INIT: "zammad@mail.test.dc.zammad.com:zammad"
  16. MAIL_ADDRESS: "zammad@mail.test.dc.zammad.com"
  17. MAIL_PASS: "zammad"
  18. # Artifacts are stored for failed jobs for 2 days
  19. .artifacts_error_template: &artifacts_error
  20. artifacts:
  21. expire_in: 2 days
  22. when: on_failure
  23. paths:
  24. - tmp/screenshot*
  25. - log/*.log
  26. # Workaround to enable usage of mixed SSH and Docker GitLab CI runners
  27. .docker_env_template: &docker_env
  28. tags:
  29. - docker
  30. # Workaround for blocked port 25 access on cloud provider infrastructure
  31. .requires_mail_port_access_template: &requires_mail_port_access
  32. tags:
  33. - mail
  34. .base_env_template: &base_env
  35. <<: *docker_env
  36. <<: *artifacts_error
  37. # General required Docker services for different DB envs
  38. .services_mysql_template: &services_mysql
  39. services:
  40. - name: registry.znuny.com/docker/zammad-mysql:latest
  41. alias: mysql
  42. .services_postgresql_template: &services_postgresql
  43. services:
  44. - name: registry.znuny.com/docker/zammad-postgresql:latest
  45. alias: postgresql
  46. # Cache gems in between jobs and pipelines
  47. cache:
  48. key: "ruby24"
  49. paths:
  50. - vendor/ruby
  51. # Initialize application env
  52. before_script:
  53. - bundle install -j $(nproc) --path vendor
  54. - bundle exec ruby script/build/database_config.rb
  55. # Stages
  56. stages:
  57. - pre
  58. - test
  59. - browser-core
  60. - browser-integration
  61. # pre stage
  62. # Workaround to enable usage of mixed SSH and Docker GitLab CI runners
  63. .pre_stage_template: &pre_stage
  64. <<: *docker_env
  65. stage: pre
  66. before_script:
  67. - '' # disable before_script for pre "non-application" env
  68. pre:rubocop:
  69. <<: *pre_stage
  70. script:
  71. - bundle install -j $(nproc) --path vendor
  72. - bundle exec rubocop
  73. pre:coffeelint:
  74. <<: *pre_stage
  75. script:
  76. - coffeelint app/
  77. pre:bundle-audit:
  78. <<: *pre_stage
  79. script:
  80. - gem install bundler-audit
  81. - bundle-audit update
  82. - bundle-audit
  83. pre:github:
  84. <<: *pre_stage
  85. tags:
  86. - deploy
  87. script:
  88. - script/build/sync_repo.sh git@github.com:zammad/zammad.git
  89. # test stage
  90. ## RSpec
  91. .script_rspec_template: &script_rspec_definition
  92. <<: *base_env
  93. variables:
  94. RAILS_ENV: "test"
  95. script:
  96. - bundle exec rake zammad:db:init
  97. - bundle exec rspec
  98. test:rspec:mysql:
  99. stage: test
  100. <<: *services_mysql
  101. <<: *script_rspec_definition
  102. test:rspec:postgresql:
  103. stage: test
  104. <<: *services_postgresql
  105. <<: *script_rspec_definition
  106. ## Unit and Controller tests
  107. .script_unit_template: &script_unit_definition
  108. <<: *base_env
  109. variables:
  110. RAILS_ENV: "test"
  111. script:
  112. - bundle exec rake zammad:db:init
  113. - bundle exec rake test:units
  114. - bundle exec ruby -I test/ test/integration/object_manager_test.rb
  115. - bundle exec ruby -I test/ test/integration/object_manager_attributes_controller_test.rb
  116. - bundle exec ruby -I test/ test/integration/package_test.rb
  117. - bundle exec ruby -I test/ test/integration/monitoring_controller_test.rb
  118. test:unit:mysql:
  119. stage: test
  120. <<: *services_mysql
  121. <<: *script_unit_definition
  122. test:unit:postgresql:
  123. stage: test
  124. <<: *services_postgresql
  125. <<: *script_unit_definition
  126. ## Integration tests
  127. .test_integration_template: &test_integration_definition
  128. <<: *base_env
  129. <<: *services_postgresql
  130. stage: test
  131. variables:
  132. RAILS_ENV: "test"
  133. test:integration:email_helper_deliver:
  134. <<: *test_integration_definition
  135. <<: *requires_mail_port_access
  136. script:
  137. - bundle exec rake zammad:db:unseeded
  138. - bundle exec ruby -I test/ test/integration/email_helper_test.rb
  139. - bundle exec ruby -I test/ test/integration/email_deliver_test.rb
  140. - bundle exec ruby -I test/ test/integration/email_keep_on_server_test.rb
  141. test:integration:facebook:
  142. <<: *test_integration_definition
  143. script:
  144. - bundle exec rake zammad:db:init
  145. - bundle exec ruby -I test/ test/integration/facebook_test.rb
  146. allow_failure: true
  147. test:integration:geo:
  148. <<: *test_integration_definition
  149. script:
  150. - bundle exec rake zammad:db:unseeded
  151. - bundle exec ruby -I test/ test/integration/geo_calendar_test.rb
  152. - bundle exec ruby -I test/ test/integration/geo_location_test.rb
  153. - bundle exec ruby -I test/ test/integration/geo_ip_test.rb
  154. test:integration:user_agent:
  155. <<: *test_integration_definition
  156. script:
  157. - bundle exec rake zammad:db:unseeded
  158. - bundle exec ruby -I test/ test/integration/user_agent_test.rb
  159. - export ZAMMAD_PROXY_TEST=true
  160. - bundle exec ruby -I test/ test/integration/user_agent_test.rb
  161. allow_failure: true
  162. test:integration:user_device:
  163. <<: *test_integration_definition
  164. script:
  165. - bundle exec rake zammad:db:unseeded
  166. - bundle exec ruby -I test/ test/integration/user_device_controller_test.rb
  167. test:integration:slack:
  168. <<: *test_integration_definition
  169. script:
  170. - bundle exec rake zammad:db:unseeded
  171. - echo "gem 'slack-api'" >> Gemfile.local
  172. - bundle install -j $(nproc)
  173. - bundle exec ruby -I test test/integration/slack_test.rb
  174. test:integration:clearbit:
  175. <<: *test_integration_definition
  176. script:
  177. - bundle exec rake zammad:db:unseeded
  178. - bundle exec ruby -I test test/integration/clearbit_test.rb
  179. allow_failure: true
  180. test:integration:telegram:
  181. <<: *test_integration_definition
  182. script:
  183. - bundle exec rake zammad:db:init
  184. - bundle exec ruby -I test test/integration/telegram_controller_test.rb
  185. test:integration:twilio:
  186. <<: *test_integration_definition
  187. script:
  188. - bundle exec rake zammad:db:init
  189. - bundle exec ruby -I test test/integration/twilio_sms_controller_test.rb
  190. test:integration:idoit:
  191. <<: *test_integration_definition
  192. script:
  193. - bundle exec rake zammad:db:init
  194. - bundle exec ruby -I test test/integration/idoit_controller_test.rb
  195. ### Elasticsearch
  196. .script_elasticsearch_template: &script_elasticsearch_definition
  197. <<: *base_env
  198. stage: test
  199. variables:
  200. RAILS_ENV: "test"
  201. ES_INDEX_RAND: "true"
  202. ES_URL: "http://elasticsearch:9200"
  203. script:
  204. - bundle exec rake zammad:db:unseeded
  205. - bundle exec ruby -I test/ test/integration/elasticsearch_active_test.rb
  206. - bundle exec ruby -I test/ test/integration/elasticsearch_test.rb
  207. - bundle exec ruby -I test/ test/integration/report_test.rb
  208. - bundle exec rspec --tag searchindex
  209. test:integration:es_mysql:
  210. <<: *script_elasticsearch_definition
  211. services:
  212. - name: registry.znuny.com/docker/zammad-mysql:latest
  213. alias: mysql
  214. - name: registry.znuny.com/docker/zammad-elasticsearch:latest
  215. alias: elasticsearch
  216. test:integration:es_postgresql:
  217. <<: *script_elasticsearch_definition
  218. services:
  219. - name: registry.znuny.com/docker/zammad-postgresql:latest
  220. alias: postgresql
  221. - name: registry.znuny.com/docker/zammad-elasticsearch:latest
  222. alias: elasticsearch
  223. ### Zendesk
  224. .script_integration_zendesk_template: &script_integration_zendesk_definition
  225. <<: *base_env
  226. <<: *services_postgresql
  227. stage: test
  228. variables:
  229. RAILS_ENV: "test"
  230. script:
  231. - bundle exec rake zammad:db:unseeded
  232. - bundle exec ruby -I test/ test/integration/zendesk_import_test.rb
  233. allow_failure: true
  234. test:integration:zendesk_mysql:
  235. <<: *services_mysql
  236. <<: *script_integration_zendesk_definition
  237. test:integration:zendesk_postgresql:
  238. <<: *services_postgresql
  239. <<: *script_integration_zendesk_definition
  240. ### OTRS
  241. .script_integration_otrs_template: &script_integration_otrs_definition
  242. <<: *base_env
  243. stage: test
  244. script:
  245. - bundle exec rake zammad:db:unseeded
  246. - bundle exec ruby -I test/ test/integration/otrs_import_test.rb
  247. .variables_integration_otrs_6_template: &variables_integration_otrs_6_definition
  248. variables:
  249. RAILS_ENV: "test"
  250. IMPORT_OTRS_ENDPOINT: "https://vz1185.test.znuny.com/otrs/public.pl?Action=ZammadMigrator"
  251. test:integration:otrs_6_mysql:
  252. <<: *services_mysql
  253. <<: *script_integration_otrs_definition
  254. <<: *variables_integration_otrs_6_definition
  255. test:integration:otrs_6_postgresql:
  256. <<: *services_postgresql
  257. <<: *script_integration_otrs_definition
  258. <<: *variables_integration_otrs_6_definition
  259. test:integration:otrs_5:
  260. <<: *services_postgresql
  261. variables:
  262. RAILS_ENV: "test"
  263. IMPORT_OTRS_ENDPOINT: "http://vz1109.demo.znuny.com/otrs/public.pl?Action=ZammadMigrator"
  264. <<: *script_integration_otrs_definition
  265. test:integration:otrs_4:
  266. <<: *services_postgresql
  267. variables:
  268. RAILS_ENV: "test"
  269. IMPORT_OTRS_ENDPOINT: "http://vz383.demo.znuny.com/otrs/public.pl?Action=ZammadMigrator"
  270. <<: *script_integration_otrs_definition
  271. test:integration:otrs_33:
  272. <<: *services_postgresql
  273. variables:
  274. RAILS_ENV: "test"
  275. IMPORT_OTRS_ENDPOINT: "http://vz305.demo.znuny.com/otrs/public.pl?Action=ZammadMigrator"
  276. <<: *script_integration_otrs_definition
  277. test:integration:otrs_32:
  278. <<: *services_postgresql
  279. variables:
  280. RAILS_ENV: "test"
  281. IMPORT_OTRS_ENDPOINT: "http://vz382.demo.znuny.com/otrs/public.pl?Action=ZammadMigrator"
  282. <<: *script_integration_otrs_definition
  283. test:integration:otrs_31:
  284. <<: *services_postgresql
  285. variables:
  286. RAILS_ENV: "test"
  287. IMPORT_OTRS_ENDPOINT: "http://vz381.demo.znuny.com/otrs/public.pl?Action=ZammadMigrator"
  288. <<: *script_integration_otrs_definition
  289. # Browser tests
  290. ## preparation (asset precompile)
  291. browser:build:
  292. <<: *base_env
  293. <<: *services_postgresql
  294. stage: test
  295. variables:
  296. RAILS_ENV: "production"
  297. script:
  298. - bundle exec rake zammad:db:unseeded
  299. - bundle exec rake assets:precompile
  300. artifacts:
  301. expire_in: 1 week
  302. paths:
  303. - public/assets/.sprockets-manifest*
  304. - public/assets/application-*
  305. - public/assets/print-*
  306. ## Browser core tests
  307. .variables_browser_template: &variables_browser_definition
  308. RAILS_ENV: "production"
  309. APP_RESTART_CMD: "bundle exec rake zammad:ci:app:restart"
  310. .test_browser_core_template: &test_browser_core_definition
  311. <<: *base_env
  312. stage: browser-core
  313. dependencies:
  314. - browser:build
  315. ### API clients
  316. test:browser:integration:api_client_ruby:
  317. <<: *test_browser_core_definition
  318. <<: *services_postgresql
  319. variables:
  320. <<: *variables_browser_definition
  321. script:
  322. - RAILS_ENV=test bundle exec rake db:create
  323. - cp contrib/auto_wizard_test.json auto_wizard.json
  324. - bundle exec rake zammad:ci:test:start
  325. - git clone https://github.com/zammad/zammad-api-client-ruby.git
  326. - cd zammad-api-client-ruby
  327. - bundle install -j $(nproc)
  328. - bundle exec rspec
  329. test:browser:integration:api_client_php:
  330. <<: *test_browser_core_definition
  331. <<: *services_postgresql
  332. variables:
  333. <<: *variables_browser_definition
  334. ZAMMAD_PHP_API_CLIENT_UNIT_TESTS_URL: "http://localhost:3000"
  335. ZAMMAD_PHP_API_CLIENT_UNIT_TESTS_USERNAME: "master@example.com"
  336. ZAMMAD_PHP_API_CLIENT_UNIT_TESTS_PASSWORD: "test"
  337. script:
  338. - RAILS_ENV=test bundle exec rake db:create
  339. - bundle exec rake zammad:ci:test:start zammad:setup:auto_wizard
  340. - git clone https://github.com/zammad/zammad-api-client-php.git
  341. - php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
  342. - php composer-setup.php --install-dir=/usr/local/bin
  343. - ln -s /usr/local/bin/composer.phar /usr/local/bin/composer
  344. - cd zammad-api-client-php
  345. - composer install
  346. - vendor/bin/phpunit
  347. ### Browser test slices
  348. #### Templates
  349. .script_browser_slice_template: &script_browser_slice_definition
  350. script:
  351. # temporary workaround to check Yahoo! mailbox only in test:browser:core:ff_3_* tests
  352. - if [[ $CI_JOB_NAME != test:browser:core:ff_3_* ]]; then unset MAILBOX_AUTO1 ; fi
  353. - if [[ $CI_JOB_NAME != test:browser:core:ff_3_* ]]; then unset MAILBOX_AUTO2 ; fi
  354. - if [[ $CI_JOB_NAME != test:browser:core:ff_3_* ]]; then unset MAILBOX_MANUAL1 ; fi
  355. - if [[ $CI_JOB_NAME != test:browser:core:ff_3_* ]]; then unset MAILBOX_MANUAL2 ; fi
  356. - env
  357. - script/build/test_slice_tests.sh $TEST_SLICE
  358. - RAILS_ENV=test bundle exec rake db:create
  359. - bundle exec rake zammad:ci:test:start[with_elasticsearch]
  360. - bundle exec rake test:browser
  361. .test_browser_core_postgresql_template: &test_browser_core_postgresql_definition
  362. <<: *test_browser_core_definition
  363. <<: *script_browser_slice_definition
  364. services:
  365. - name: registry.znuny.com/docker/zammad-postgresql:latest
  366. alias: postgresql
  367. - name: registry.znuny.com/docker/zammad-elasticsearch:latest
  368. alias: elasticsearch
  369. - name: docker.io/elgalu/selenium:3.141.59-p8
  370. alias: selenium
  371. - name: registry.znuny.com/docker/docker-imap-devel:latest
  372. alias: mail
  373. .test_browser_core_mysql_template: &test_browser_core_mysql_definition
  374. <<: *test_browser_core_definition
  375. <<: *script_browser_slice_definition
  376. services:
  377. - name: registry.znuny.com/docker/zammad-mysql:latest
  378. alias: mysql
  379. - name: registry.znuny.com/docker/zammad-elasticsearch:latest
  380. alias: elasticsearch
  381. - name: docker.io/elgalu/selenium:3.141.59-p8
  382. alias: selenium
  383. - name: registry.znuny.com/docker/docker-imap-devel:latest
  384. alias: mail
  385. #### Firefox
  386. test:browser:core:ff_1_mysql:
  387. <<: *test_browser_core_mysql_definition
  388. variables:
  389. <<: *variables_browser_definition
  390. BROWSER: "firefox"
  391. TEST_SLICE: "1"
  392. test:browser:core:ff_2_mysql:
  393. <<: *test_browser_core_mysql_definition
  394. variables:
  395. <<: *variables_browser_definition
  396. BROWSER: "firefox"
  397. TEST_SLICE: "2"
  398. test:browser:core:ff_3_mysql:
  399. <<: *test_browser_core_mysql_definition
  400. <<: *requires_mail_port_access
  401. variables:
  402. <<: *variables_browser_definition
  403. BROWSER: "firefox"
  404. TEST_SLICE: "3"
  405. test:browser:core:ff_4_mysql:
  406. <<: *test_browser_core_mysql_definition
  407. variables:
  408. <<: *variables_browser_definition
  409. BROWSER: "firefox"
  410. TEST_SLICE: "4"
  411. test:browser:core:ff_5_mysql:
  412. <<: *test_browser_core_mysql_definition
  413. variables:
  414. <<: *variables_browser_definition
  415. BROWSER: "firefox"
  416. TEST_SLICE: "5"
  417. test:browser:core:ff_6_mysql:
  418. <<: *test_browser_core_mysql_definition
  419. variables:
  420. <<: *variables_browser_definition
  421. BROWSER: "firefox"
  422. TEST_SLICE: "6"
  423. test:browser:core:ff_1_postgresql:
  424. <<: *test_browser_core_postgresql_definition
  425. variables:
  426. <<: *variables_browser_definition
  427. BROWSER: "firefox"
  428. TEST_SLICE: "1"
  429. test:browser:core:ff_2_postgresql:
  430. <<: *test_browser_core_postgresql_definition
  431. variables:
  432. <<: *variables_browser_definition
  433. BROWSER: "firefox"
  434. TEST_SLICE: "2"
  435. test:browser:core:ff_3_postgresql:
  436. <<: *test_browser_core_postgresql_definition
  437. <<: *requires_mail_port_access
  438. variables:
  439. <<: *variables_browser_definition
  440. BROWSER: "firefox"
  441. TEST_SLICE: "3"
  442. test:browser:core:ff_4_postgresql:
  443. <<: *test_browser_core_postgresql_definition
  444. variables:
  445. <<: *variables_browser_definition
  446. BROWSER: "firefox"
  447. TEST_SLICE: "4"
  448. test:browser:core:ff_5_postgresql:
  449. <<: *test_browser_core_postgresql_definition
  450. variables:
  451. <<: *variables_browser_definition
  452. BROWSER: "firefox"
  453. TEST_SLICE: "5"
  454. test:browser:core:ff_6_postgresql:
  455. <<: *test_browser_core_postgresql_definition
  456. variables:
  457. <<: *variables_browser_definition
  458. BROWSER: "firefox"
  459. TEST_SLICE: "6"
  460. ### Chrome
  461. test:browser:core:chrome_1_mysql:
  462. <<: *test_browser_core_mysql_definition
  463. variables:
  464. <<: *variables_browser_definition
  465. BROWSER: "chrome"
  466. TEST_SLICE: "1"
  467. test:browser:core:chrome_2_mysql:
  468. <<: *test_browser_core_mysql_definition
  469. variables:
  470. <<: *variables_browser_definition
  471. BROWSER: "chrome"
  472. TEST_SLICE: "2"
  473. test:browser:core:chrome_3_mysql:
  474. <<: *test_browser_core_mysql_definition
  475. variables:
  476. <<: *variables_browser_definition
  477. BROWSER: "chrome"
  478. TEST_SLICE: "3"
  479. test:browser:core:chrome_4_mysql:
  480. <<: *test_browser_core_mysql_definition
  481. variables:
  482. <<: *variables_browser_definition
  483. BROWSER: "chrome"
  484. TEST_SLICE: "4"
  485. test:browser:core:chrome_5_mysql:
  486. <<: *test_browser_core_mysql_definition
  487. variables:
  488. <<: *variables_browser_definition
  489. BROWSER: "chrome"
  490. TEST_SLICE: "5"
  491. test:browser:core:chrome_6_mysql:
  492. <<: *test_browser_core_mysql_definition
  493. variables:
  494. <<: *variables_browser_definition
  495. BROWSER: "chrome"
  496. TEST_SLICE: "6"
  497. test:browser:core:chrome_1_postgresql:
  498. <<: *test_browser_core_postgresql_definition
  499. variables:
  500. <<: *variables_browser_definition
  501. BROWSER: "chrome"
  502. TEST_SLICE: "1"
  503. test:browser:core:chrome_2_postgresql:
  504. <<: *test_browser_core_postgresql_definition
  505. variables:
  506. <<: *variables_browser_definition
  507. BROWSER: "chrome"
  508. TEST_SLICE: "2"
  509. test:browser:core:chrome_3_postgresql:
  510. <<: *test_browser_core_postgresql_definition
  511. variables:
  512. <<: *variables_browser_definition
  513. BROWSER: "chrome"
  514. TEST_SLICE: "3"
  515. test:browser:core:chrome_4_postgresql:
  516. <<: *test_browser_core_postgresql_definition
  517. variables:
  518. <<: *variables_browser_definition
  519. BROWSER: "chrome"
  520. TEST_SLICE: "4"
  521. test:browser:core:chrome_5_postgresql:
  522. <<: *test_browser_core_postgresql_definition
  523. variables:
  524. <<: *variables_browser_definition
  525. BROWSER: "chrome"
  526. TEST_SLICE: "5"
  527. test:browser:core:chrome_6_postgresql:
  528. <<: *test_browser_core_postgresql_definition
  529. variables:
  530. <<: *variables_browser_definition
  531. BROWSER: "chrome"
  532. TEST_SLICE: "6"
  533. ### Auto wizard
  534. .auto_wizard_services_template: &auto_wizard_services
  535. services:
  536. - name: registry.znuny.com/docker/zammad-postgresql:latest
  537. alias: postgresql
  538. - name: docker.io/elgalu/selenium:3.141.59-p8
  539. alias: selenium
  540. .test_browser_integration_template: &test_browser_integration_definition
  541. <<: *base_env
  542. <<: *auto_wizard_services
  543. stage: browser-integration
  544. dependencies:
  545. - browser:build
  546. .script_integration_auto_wizard_template: &script_integration_auto_wizard_definition
  547. script:
  548. - RAILS_ENV=test bundle exec rake db:create
  549. - cp $AUTO_WIZARD_FILE auto_wizard.json
  550. - bundle exec rake zammad:ci:test:start
  551. - bundle exec ruby -I test/ $TEST_FILE
  552. .browser_core_auto_wizard_template: &browser_core_auto_wizard_definition
  553. <<: *test_browser_core_definition
  554. <<: *auto_wizard_services
  555. <<: *script_integration_auto_wizard_definition
  556. test:browser:autowizard_chrome:
  557. <<: *browser_core_auto_wizard_definition
  558. variables:
  559. <<: *variables_browser_definition
  560. BROWSER: "chrome"
  561. AUTO_WIZARD_FILE: "contrib/auto_wizard_example.json"
  562. TEST_FILE: "test/integration/auto_wizard_browser_test.rb"
  563. test:browser:autowizard_ff:
  564. <<: *browser_core_auto_wizard_definition
  565. variables:
  566. <<: *variables_browser_definition
  567. BROWSER: "firefox"
  568. AUTO_WIZARD_FILE: "contrib/auto_wizard_example.json"
  569. TEST_FILE: "test/integration/auto_wizard_browser_test.rb"
  570. ### Browser integration tests
  571. .browser_integration_auto_wizard_template: &browser_integration_auto_wizard_definition
  572. <<: *test_browser_integration_definition
  573. <<: *script_integration_auto_wizard_definition
  574. test:browser:integration:twitter_chrome:
  575. <<: *browser_integration_auto_wizard_definition
  576. variables:
  577. <<: *variables_browser_definition
  578. BROWSER: "chrome"
  579. AUTO_WIZARD_FILE: "contrib/auto_wizard_test.json"
  580. TEST_FILE: "test/integration/twitter_browser_test.rb"
  581. test:browser:integration:twitter_ff:
  582. <<: *browser_integration_auto_wizard_definition
  583. variables:
  584. <<: *variables_browser_definition
  585. BROWSER: "firefox"
  586. AUTO_WIZARD_FILE: "contrib/auto_wizard_test.json"
  587. TEST_FILE: "test/integration/twitter_browser_test.rb"
  588. test:browser:integration:facebook_chrome:
  589. <<: *browser_integration_auto_wizard_definition
  590. variables:
  591. <<: *variables_browser_definition
  592. BROWSER: "chrome"
  593. AUTO_WIZARD_FILE: "contrib/auto_wizard_test.json"
  594. TEST_FILE: "test/integration/facebook_browser_test.rb"
  595. test:browser:integration:facebook_ff:
  596. <<: *browser_integration_auto_wizard_definition
  597. variables:
  598. <<: *variables_browser_definition
  599. BROWSER: "firefox"
  600. AUTO_WIZARD_FILE: "contrib/auto_wizard_test.json"
  601. TEST_FILE: "test/integration/facebook_browser_test.rb"
  602. test:browser:integration:idoit_chrome:
  603. <<: *browser_integration_auto_wizard_definition
  604. variables:
  605. <<: *variables_browser_definition
  606. BROWSER: "chrome"
  607. AUTO_WIZARD_FILE: "contrib/auto_wizard_test.json"
  608. TEST_FILE: "test/integration/idoit_browser_test.rb"
  609. ### Browser integration tests
  610. .variables_browser_import_template: &variables_browser_import_definition
  611. BROWSER: "chrome"
  612. RAILS_SERVE_STATIC_FILES: "true"
  613. RAILS_ENV: "production"
  614. .browser_integration_import_template: &browser_integration_import_definition
  615. <<: *test_browser_integration_definition
  616. script:
  617. - RAILS_ENV=test bundle exec rake db:create
  618. - bundle exec rake zammad:ci:test:start
  619. - bundle exec ruby -I test/ $TEST_FILE
  620. test:browser:integration:otrs_chrome:
  621. <<: *browser_integration_import_definition
  622. variables:
  623. <<: *variables_browser_import_definition
  624. TEST_FILE: "test/integration/otrs_import_browser_test.rb"
  625. test:browser:integration:zendesk_chrome:
  626. <<: *browser_integration_import_definition
  627. variables:
  628. <<: *variables_browser_import_definition
  629. TEST_FILE: "test/integration/zendesk_import_browser_test.rb"