forked from zammad/zammad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
74 lines (74 loc) · 2.22 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
dist: trusty
sudo: false
notifications:
email:
env:
- DB=mysql
- DB=postgresql
addons:
postgresql: "9.4"
apt:
packages:
- autoconf
- automake
- autotools-dev
- bison
- build-essential
- curl
- git-core
- libffi-dev
- libgdbm-dev
- libgmp-dev
- libmysqlclient-dev
- libncurses5-dev
- libreadline6-dev
- libsqlite3-dev
- libssl-dev
- libtool
- libxml2-dev
- libxslt1-dev
- libyaml-0-2
- libyaml-dev
- mysql-client-5.6
- mysql-client-core-5.6
- mysql-server-5.6
- patch
- pkg-config
- postfix
- sqlite3
- zlib1g-dev
services:
- postgresql
- mysql
language: ruby
rvm:
- 2.4.4
before_install:
- gem update --system # Due to: https://github.com/travis-ci/travis-ci/issues/8978
- git fetch --unshallow
- 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
- export ZAMMAD_VERSION=$(git describe --tags | sed -e 's/-[a-z0-9]\{8,\}.*//g')
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
- bundle exec rspec
- rake db:reset
- rake test:units
- rake test:controllers
- ruby -I test/ test/integration/object_manager_test.rb
- ruby -I test/ test/integration/package_test.rb
after_success:
- if [ "${DB}" = "mysql" ]; then contrib/travis-ci.org/trigger_docker_image_build.sh; fi
- if [ "${DB}" = "mysql" ]; then contrib/travis-ci.org/trigger_docker_image_compose_build.sh; fi
- if [ "${DB}" = "mysql" ]; then contrib/travis-ci.org/trigger_docker_image_univention_build.sh; fi