.travis.yml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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.3.1
  23. before_install:
  24. - sudo apt-get -qq update
  25. - 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
  26. - if [ "${DB}" = "mysql" ]; then mysql -u root -e "CREATE USER 'some_user'@'localhost' IDENTIFIED BY 'some_pass';"; fi
  27. - if [ "${DB}" = "mysql" ]; then mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'some_user'@'localhost';"; fi
  28. - if [ "${DB}" = "mysql" ]; then cp config/database.yml.test-mysql config/database.yml; fi
  29. - if [ "${DB}" = "postgresql" ]; then psql -c 'create database zammad_test;' -U postgres; fi
  30. - if [ "${DB}" = "postgresql" ]; then cp config/database.yml.test-postgresql config/database.yml; fi
  31. - export RAILS_ENV=test
  32. install:
  33. - if [ "${DB}" = "mysql" ]; then bundle install --without postgres; fi
  34. - if [ "${DB}" = "postgresql" ]; then bundle install; fi
  35. script:
  36. - bundle exec rubocop
  37. - rake db:create
  38. - rake db:migrate
  39. - rake db:seed
  40. - rake test:units
  41. - rake test:controllers
  42. - rake assets:precompile
  43. - rake db:drop
  44. - rake db:create
  45. - rake db:migrate
  46. - rake db:seed
  47. - ruby -I test/ test/integration/auto_wizard_test.rb
  48. - rake db:drop
  49. - rake db:create
  50. - rake db:migrate
  51. - rake db:seed
  52. - ruby -I test/ test/integration/geo_location_test.rb
  53. - ruby -I test/ test/integration/geo_calendar_test.rb
  54. - ruby -I test/ test/integration/user_agent_test.rb
  55. - ruby -I test/ test/integration/user_device_controller_test.rb
  56. - ruby -I test/ test/integration/sipgate_controller_test.rb
  57. - rake db:drop