api_client.yml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. .template_api_client:
  2. stage: test
  3. extends:
  4. - .job_rules_default
  5. - .tags_docker_low_concurrency
  6. services:
  7. - !reference [.services, mysql]
  8. - !reference [.services, postgresql]
  9. - !reference [.services, redis]
  10. - !reference [.services, memcached]
  11. variables:
  12. RAILS_ENV: "production"
  13. APP_RESTART_CMD: 'bundle exec rake environment zammad:ci:app:restart'
  14. api_client:php:
  15. extends:
  16. - .template_api_client
  17. variables:
  18. ZAMMAD_PHP_API_CLIENT_UNIT_TESTS_URL: "http://localhost:3000"
  19. ZAMMAD_PHP_API_CLIENT_UNIT_TESTS_USERNAME: "admin@example.com"
  20. ZAMMAD_PHP_API_CLIENT_UNIT_TESTS_PASSWORD: "test"
  21. ZAMMAD_PHP_API_CLIENT_UNIT_TESTS_DEBUG: 0
  22. script:
  23. - RAILS_ENV=test bundle exec rake db:create
  24. - echo -e "\\e[0Ksection_start:`date +%s`:zammad_ci_test_start[collapsed=true]\\r\\e[0Kbundle exec rake zammad:ci:test:start"
  25. - RAILS_ENV=test bundle exec rake zammad:ci:test:start zammad:setup:auto_wizard
  26. - echo -e "\\e[0Ksection_end:`date +%s`:zammad_ci_test_start\\r\\e[0K"
  27. - git clone https://github.com/zammad/zammad-api-client-php.git
  28. - php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
  29. - php composer-setup.php --install-dir=/usr/local/bin
  30. - ln -s /usr/local/bin/composer.phar /usr/local/bin/composer
  31. - cd zammad-api-client-php
  32. - composer install
  33. - vendor/bin/phpunit
  34. api_client:ruby:
  35. extends:
  36. - .template_api_client
  37. script:
  38. - RAILS_ENV=test bundle exec rake db:create
  39. - cp contrib/auto_wizard_test.json auto_wizard.json
  40. - echo -e "\\e[0Ksection_start:`date +%s`:zammad_ci_test_start[collapsed=true]\\r\\e[0Kbundle exec rake zammad:ci:test:start"
  41. - bundle exec rake zammad:ci:test:start
  42. - echo -e "\\e[0Ksection_end:`date +%s`:zammad_ci_test_start\\r\\e[0K"
  43. - git clone https://github.com/zammad/zammad-api-client-ruby.git
  44. - cd zammad-api-client-ruby
  45. - bundle update --bundler
  46. - bundle install -j $(nproc)
  47. - bundle exec rspec