.travis.yml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. dist: trusty
  2. sudo: required
  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. - mysql-server-5.6
  14. - mysql-client-core-5.6
  15. - mysql-client-5.6
  16. services:
  17. - postgresql
  18. - mysql
  19. language: ruby
  20. rvm:
  21. - 2.3.1
  22. before_install:
  23. - sudo apt-get -qq update
  24. - 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
  25. - mysql -u root -e "CREATE USER 'some_user'@'localhost' IDENTIFIED BY 'some_pass';"
  26. - mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'some_user'@'localhost';"
  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. install:
  34. - if [ "${DB}" = "mysql" ]; then bundle install --without postgres; fi
  35. - if [ "${DB}" = "postgresql" ]; then bundle install; fi
  36. script:
  37. - bundle exec rubocop
  38. - rake db:create
  39. - rake db:migrate
  40. - rake db:seed
  41. - rake test:units
  42. - rake test:controllers
  43. - rake assets:precompile
  44. - rake db:drop
  45. - rake db:create
  46. - rake db:migrate
  47. - rake db:seed
  48. - ruby -I test/ test/integration/auto_wizard_test.rb
  49. - rake db:drop
  50. - rake db:create
  51. - rake db:migrate
  52. - rake db:seed
  53. - ruby -I test/ test/integration/geo_location_test.rb
  54. - ruby -I test/ test/integration/geo_calendar_test.rb
  55. - ruby -I test/ test/integration/user_agent_test.rb
  56. - ruby -I test/ test/integration/user_device_controller_test.rb
  57. - ruby -I test/ test/integration/sipgate_controller_test.rb
  58. - rake db:drop