.travis.yml 2.5 KB

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