api_client.yml 2.0 KB

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