dist: trusty sudo: required group: deprecated notifications: email: - me+tv@zammad.com env: - DB=mysql - DB=postgresql addons: postgresql: "9.4" apt: packages: - mysql-server-5.6 - mysql-client-core-5.6 - mysql-client-5.6 services: - postgresql - mysql language: ruby rvm: - 2.3.1 before_install: - sudo apt-get -qq update - 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 - if [ "${DB}" = "mysql" ]; then mysql -u root -e "CREATE USER 'some_user'@'localhost' IDENTIFIED BY 'some_pass';"; fi - if [ "${DB}" = "mysql" ]; then mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'some_user'@'localhost';"; fi - if [ "${DB}" = "mysql" ]; then cp config/database.yml.test-mysql config/database.yml; fi - if [ "${DB}" = "postgresql" ]; then psql -c 'create database zammad_test;' -U postgres; fi - if [ "${DB}" = "postgresql" ]; then cp config/database.yml.test-postgresql config/database.yml; fi - export RAILS_ENV=test install: - if [ "${DB}" = "mysql" ]; then bundle install --without postgres; fi - if [ "${DB}" = "postgresql" ]; then bundle install; fi script: - bundle exec rubocop - rake db:create - rake db:migrate - rake db:seed - rake test:units - rake test:controllers - rake assets:precompile - rake db:drop - rake db:create - rake db:migrate - rake db:seed - ruby -I test/ test/integration/auto_wizard_test.rb - rake db:drop - rake db:create - rake db:migrate - rake db:seed - ruby -I test/ test/integration/geo_location_test.rb - ruby -I test/ test/integration/geo_calendar_test.rb - ruby -I test/ test/integration/user_agent_test.rb - ruby -I test/ test/integration/user_device_controller_test.rb - ruby -I test/ test/integration/sipgate_controller_test.rb - rake db:drop