.travis.yml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. dist: trusty
  2. sudo: false
  3. notifications:
  4. email:
  5. - me+tv@zammad.com
  6. env:
  7. - DB=mysql
  8. - DB=postgresql
  9. addons:
  10. postgresql: "9.4"
  11. apt:
  12. packages:
  13. - autoconf
  14. - automake
  15. - autotools-dev
  16. - bison
  17. - build-essential
  18. - curl
  19. - git-core
  20. - libffi-dev
  21. - libgdbm-dev
  22. - libgmp-dev
  23. - libmysqlclient-dev
  24. - libncurses5-dev
  25. - libreadline6-dev
  26. - libsqlite3-dev
  27. - libssl-dev
  28. - libtool
  29. - libxml2-dev
  30. - libxslt1-dev
  31. - libyaml-0-2
  32. - libyaml-dev
  33. - mysql-client-5.6
  34. - mysql-client-core-5.6
  35. - mysql-server-5.6
  36. - patch
  37. - pkg-config
  38. - postfix
  39. - sqlite3
  40. - zlib1g-dev
  41. services:
  42. - postgresql
  43. - mysql
  44. language: ruby
  45. rvm:
  46. - 2.4.2
  47. before_install:
  48. - git fetch --unshallow
  49. - if [ "${DB}" = "mysql" ]; then mysql -u root -e "CREATE USER 'some_user'@'localhost' IDENTIFIED BY 'some_pass';"; fi
  50. - if [ "${DB}" = "mysql" ]; then mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'some_user'@'localhost';"; fi
  51. - if [ "${DB}" = "mysql" ]; then cp config/database.yml.test-mysql config/database.yml; fi
  52. - if [ "${DB}" = "postgresql" ]; then psql -c 'create database zammad_test;' -U postgres; fi
  53. - if [ "${DB}" = "postgresql" ]; then cp config/database.yml.test-postgresql config/database.yml; fi
  54. - export RAILS_ENV=test
  55. - export ZAMMAD_VERSION=$(git describe --tags | sed -e 's/-[a-z0-9]\{8,\}.*//g')
  56. install:
  57. - if [ "${DB}" = "mysql" ]; then bundle install --without postgres; fi
  58. - if [ "${DB}" = "postgresql" ]; then bundle install; fi
  59. script:
  60. - bundle exec rubocop
  61. - rake db:create
  62. - rake db:migrate
  63. - rake db:seed
  64. - rake test:units
  65. - rake test:controllers
  66. - ruby -I test/ test/integration/object_manager_test.rb
  67. - ruby -I test/ test/integration/package_test.rb
  68. - rake assets:precompile
  69. - rake db:drop
  70. - rake db:create
  71. - rake db:migrate
  72. - rake db:seed
  73. - ruby -I test/ test/integration/auto_wizard_test.rb
  74. - rake db:drop
  75. - rake db:create
  76. - rake db:migrate
  77. - rake db:seed
  78. - ruby -I test/ test/integration/geo_location_test.rb
  79. - ruby -I test/ test/integration/geo_calendar_test.rb
  80. - ruby -I test/ test/integration/user_agent_test.rb
  81. - ruby -I test/ test/integration/user_device_controller_test.rb
  82. - ruby -I test/ test/integration/sipgate_controller_test.rb
  83. - rake db:drop
  84. after_success:
  85. - if [ "${DB}" = "mysql" ]; then contrib/travis-ci.org/trigger_docker_image_build.sh; fi
  86. - if [ "${DB}" = "mysql" ]; then contrib/travis-ci.org/trigger_docker_image_compose_build.sh; fi
  87. - if [ "${DB}" = "mysql" ]; then contrib/travis-ci.org/trigger_docker_image_univention_build.sh; fi