rspec.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. include:
  2. - local: '/.gitlab/ci/rspec/mysql.yml'
  3. - local: '/.gitlab/ci/rspec/postgresql.yml'
  4. .template_rspec: &template_rspec
  5. extends:
  6. - .env_base
  7. - .variables_rspec_slicing
  8. script:
  9. - echo -e "\\e[0Ksection_start:`date +%s`:zammad_db_init[collapsed=true]\\r\\e[0Kbundle exec rake zammad:db:init"
  10. - bundle exec rake zammad:db:init
  11. - echo -e "\\e[0Ksection_end:`date +%s`:zammad_db_init\\r\\e[0K"
  12. - echo "RSpec filter:" "$RSPEC_EXAMPLE_MATCHES"
  13. - bundle exec rspec --require ./spec/rspec_extensions.rb --example-matches "$RSPEC_EXAMPLE_MATCHES" --exclude-pattern "spec/{system,integration}/**/*_spec.rb" -t ~searchindex --profile 10
  14. # RSpec 3rd party integration tests are independent of the database
  15. # therefore we need only one job and choose a random database for each run
  16. # Optionally pass INTEGRATION_TESTS=enabled to run them in private- branch
  17. rspec:integration:
  18. stage: test
  19. extends:
  20. - .env_base
  21. - .services_mysql_postgresql_redis_memcached
  22. - .rules_integration_manual_start
  23. variables:
  24. RAILS_ENV: "test"
  25. script:
  26. - echo -e "\\e[0Ksection_start:`date +%s`:zammad_db_init[collapsed=true]\\r\\e[0Kbundle exec rake zammad:db:init"
  27. - bundle exec rake zammad:db:init
  28. - echo -e "\\e[0Ksection_end:`date +%s`:zammad_db_init\\r\\e[0K"
  29. - bundle exec rspec -t type:integration --profile 10