forked from Bodacious/blogit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
46 lines (36 loc) · 1.26 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
language: ruby
env:
- RAILS_VERSION=master
- RAILS_VERSION=4.1.0
- RAILS_VERSION=4.0.0
- RAILS_VERSION=3.2.0
- DB=sqlite
- DB=mysql
- DB=postgresql
rvm:
- 1.9.3
- 2.0.0
- ruby-head
matrix:
allow_failures:
- env: RAILS_VERSION=master
- rvm: ruby-head
before_install:
- sudo apt-get update
- sudo apt-get install libpython2.7 python-pygments
before_script:
# Ensure the MySQL DB Exists
- mysql -e 'create database blogit_app_test'
- psql -c 'create database blogit_app_test' -U postgres
script:
# Create the blogit config file
- bundle exec rails generate blogit:install
# Create the acts-as-taggable-on and blogit migrations
# If Rails version is 3, use the old rake tasks.
# If Rails version is 4, use the new rake tasks.
- if (echo $RAILS_VERSION | grep '3.\d.\d'); then bundle exec rake acts_as_taggable_on:install:migrations; else bundle exec rake app:acts_as_taggable_on_engine:install:migrations; fi
- if (echo $RAILS_VERSION | grep '3.\d.\d'); then bundle exec rake blogit:install:migrations; else bundle exec rake app:blogit:install:migrations; fi
# Make sure the databases are up to date
- cd spec/dummy && RAILS_ENV=test bundle exec rake db:migrate --trace
# Run the specs
- cd ../../ && bundle exec rspec spec