forked from zammad/zammad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
57 lines (57 loc) · 2 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
dist: trusty
sudo: required
group: deprecated
notifications:
email:
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