__templates__.yml 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. .template_browser-core:
  2. stage: browser
  3. extends:
  4. - .job_rules_default
  5. - .tags_docker_low_concurrency
  6. variables:
  7. RAILS_ENV: "production"
  8. APP_RESTART_CMD: 'bundle exec rake environment zammad:ci:app:restart'
  9. script:
  10. - |
  11. script/build/test_slice_tests.sh $TEST_SLICE
  12. # Tests in the first slice do not expect for the auto wizard to be run.
  13. if [ $TEST_SLICE = 1 ]
  14. then
  15. echo -e "\\e[0Ksection_start:`date +%s`:zammad_ci_test_start[collapsed=true]\\r\\e[0Kbundle exec rake zammad:ci:test:start"
  16. bundle exec rake zammad:ci:test:start[with_elasticsearch]
  17. echo -e "\\e[0Ksection_end:`date +%s`:zammad_ci_test_start\\r\\e[0K"
  18. else
  19. echo -e "\\e[0Ksection_start:`date +%s`:zammad_ci_test_prepare[collapsed=true]\\r\\e[0Kbundle exec rake zammad:ci:test:prepare zammad:setup:auto_wizard zammad:ci:app:start"
  20. # Deconstruct zammad:ci:test:start command, so it starts the server only after the auto wizard has run.
  21. # This prevents instability due to `ZAMMAD_SETTING_TTL` not kicking in.
  22. bundle exec rake zammad:ci:test:prepare[with_elasticsearch] zammad:setup:auto_wizard[contrib/auto_wizard_browser_test.json] zammad:ci:app:start
  23. echo -e "\\e[0Ksection_end:`date +%s`:zammad_ci_test_prepare\\r\\e[0K"
  24. fi
  25. bundle exec rails test --fail-fast test/browser
  26. .template_browser-core_chrome:
  27. extends:
  28. - .template_browser-core
  29. - .variables_selenium_chrome
  30. services:
  31. - !reference [.services, postgresql]
  32. - !reference [.services, elasticsearch]
  33. - !reference [.services, selenium-chrome]
  34. - !reference [.services, imap]
  35. - !reference [.services, redis]
  36. - !reference [.services, memcached]
  37. .template_browser-core_firefox:
  38. extends:
  39. - .template_browser-core
  40. - .variables_selenium_firefox
  41. services:
  42. - !reference [.services, postgresql]
  43. - !reference [.services, elasticsearch]
  44. - !reference [.services, selenium-firefox]
  45. - !reference [.services, imap]
  46. - !reference [.services, redis]
  47. - !reference [.services, memcached]
  48. .template_browser-core_capybara:
  49. stage: browser
  50. extends:
  51. - .job_rules_default
  52. - .tags_docker_low_concurrency
  53. script:
  54. - !reference [.scripts, zammad_ci_test_prepare]
  55. - bundle exec rspec --require ./spec/rspec_extensions.rb --fail-fast -t ~integration --profile 10 spec/system
  56. .template_browser-core_capybara_chrome:
  57. extends:
  58. - .template_browser-core_capybara
  59. - .variables_selenium_chrome
  60. - .variables_proxy
  61. services:
  62. - !reference [.services, postgresql]
  63. - !reference [.services, elasticsearch]
  64. - !reference [.services, selenium-chrome]
  65. - !reference [.services, imap]
  66. - !reference [.services, redis]
  67. - !reference [.services, memcached]
  68. - !reference [.services, proxy]
  69. .template_browser-core_capybara_firefox:
  70. extends:
  71. - .template_browser-core_capybara
  72. - .variables_selenium_firefox
  73. - .variables_proxy
  74. services:
  75. - !reference [.services, postgresql]
  76. - !reference [.services, elasticsearch]
  77. - !reference [.services, selenium-firefox]
  78. - !reference [.services, imap]
  79. - !reference [.services, redis]
  80. - !reference [.services, memcached]
  81. - !reference [.services, proxy]