-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.travis.yml
55 lines (50 loc) · 2.23 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
language: ruby
rvm:
- 2.3.0
- 2.0.0-p598 # CentOS 7
- 2.1.5 # Debian 8
addons:
postgresql: "9.3"
before_install:
- if ruby --version | cut -d ' ' -f 2 | grep -q 2.1.5p273 ; then gem update --system 2.4.8; fi
before_script:
# Set script configuration
- export ANALIZO_VERSION='1.17.0' # Version >1.17.0 needs Ubuntu 13.10/Debian 7
- sudo pip install radon
# Kalibro dependencies (including Analizo)
# Remove bugged libzmq3 package, see https://github.com/travis-ci/travis-ci/issues/982 and https://github.com/travis-ci/travis-ci/issues/1715 for details
- sudo apt-get remove libzmq3
- sudo bash -c "echo \"deb http://analizo.org/download/ ./\" > /etc/apt/sources.list.d/analizo.list"
- sudo bash -c "echo \"deb-src http://analizo.org/download/ ./\" >> /etc/apt/sources.list.d/analizo.list"
- wget -O - http://analizo.org/download/signing-key.asc | sudo apt-key add -
- sudo apt-get update -qq
- sudo DEBIAN_FRONTEND=noninteractive apt-get install -y analizo=${ANALIZO_VERSION} subversion git
# Kalibro Configurations
- git clone https://github.com/mezuro/kalibro_configurations.git -b v2.0.0 kalibro_configurations
- pushd kalibro_configurations
- cp config/database.yml.postgresql_sample config/database.yml
- psql -c "create role kalibro_configurations with createdb login password 'kalibro_configurations'" -U postgres
- export BUNDLE_GEMFILE=$PWD/Gemfile
- bundle install --retry=3
- bundle exec rake db:setup db:migrate
- popd
- export BUNDLE_GEMFILE=$PWD/Gemfile
- psql -c "create role kalibro_processor with createdb login password 'kalibro_processor'" -U postgres
- cp config/database.yml.sample config/database.yml
- cp config/repositories.yml.sample config/repositories.yml
- bundle exec rake db:setup db:migrate
- bundle exec rake tmp:create
- export CODECLIMATE_REPO_TOKEN=71b13a8a121d095ab8f5884e532874909b42124f7488bc9c2b4613f70da64d8d
script:
- bundle exec rake spec
# Starting kalibro_configurations here ensures that the unit tests are properly mocked
- pushd kalibro_configurations
- bundle exec rails s -p 8083 -d
- popd
- bundle exec cucumber --tags ~@docker
notifications:
email:
recipients:
on_success: change
on_failure: always