123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- include:
- - local: '/.gitlab/ci/rspec/mysql.yml'
- - local: '/.gitlab/ci/rspec/postgresql.yml'
- .template_rspec: &template_rspec
- extends:
- - .env_base
- variables:
- RAILS_ENV: "test"
- script:
- - bundle exec rake zammad:db:init
- - bundle exec rspec --exclude-pattern "spec/{system,integration}/**/*_spec.rb" -t ~searchindex -t ~db_strategy:reset
- .template_rspec_db_reset: &template_rspec_db_reset
- extends:
- - .env_base
- variables:
- RAILS_ENV: "test"
- script:
- - bundle exec rake zammad:db:init
- - bundle exec rspec --exclude-pattern "spec/{system,integration}/**/*_spec.rb" -t ~searchindex -t db_strategy:reset
- # RSpec 3rd party integration tests are independent of the database
- # therefore we need only one job and choose a random database for each run
- .rspec_integration_rules: &rspec_integration_rules
- rules:
- - if: $CI_MERGE_REQUEST_ID
- when: never
- - if: '$CI_COMMIT_BRANCH =~ /^private/ && $INTEGRATION_TESTS != null'
- when: manual
- allow_failure: true
- - when: on_success
- rspec:integration:
- stage: test
- extends:
- - .env_base
- - .services_mysql_postgresql
- - .rspec_integration_rules
- variables:
- RAILS_ENV: "test"
- script:
- - bundle exec rake zammad:db:init
- - bundle exec rspec -t type:integration
|