migration.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #
  2. # Test the migration from the `stable-6.0` branch to `develop`.
  3. #
  4. .template_migration:
  5. stage: test
  6. before_script: []
  7. script:
  8. # First, checkout stable and set it up.
  9. - git fetch --unshallow
  10. - git checkout stable-6.0
  11. - !reference [.scripts, source_rvm]
  12. - rvm use 3.1.3
  13. - !reference [.scripts, bundle_install]
  14. - !reference [.scripts, configure_environment]
  15. - !reference [.scripts, zammad_db_init]
  16. # Then, switch to the current commit, migrate to it and run a few selected tests.
  17. - git checkout $CI_COMMIT_SHA
  18. - rvm use 3.2.4
  19. - !reference [.scripts, bundle_install]
  20. # Force redis usage, even if it was disabled by the initial configure_environment script of stable.
  21. - export REDIS_URL=redis://redis
  22. - bundle exec rails db:migrate
  23. - bundle exec rspec --profile 10 spec/db -t ~searchindex
  24. rspec:migration:postgresql:
  25. extends:
  26. - .template_migration
  27. services:
  28. - !reference [.services, postgresql]
  29. - !reference [.services, redis]
  30. rspec:migration:mysql:
  31. extends:
  32. - .template_migration
  33. services:
  34. - !reference [.services, mysql]
  35. - !reference [.services, redis]
  36. rspec:migration:mariadb:
  37. extends:
  38. - .template_migration
  39. services:
  40. - !reference [.services, mariadb]
  41. - !reference [.services, redis]