Travis config for parallel execution on five nodes

This Travis configuration runs rspec on five build machines in parallel. Currently, that takes 15 to 20 minutes.
This commit is contained in:
Maikel
2015-10-08 15:24:48 +11:00
parent 9c6264c4a0
commit 9115e1175e

View File

@@ -2,14 +2,24 @@ language: ruby
bundler_args: --without development
rvm:
- "1.9.3"
services: postgresql
before_install:
# The test cases are roughly split according to their test times.
# It would be better to use https://github.com/ArturT/knapsack.
env:
- TEST_CASES="./spec/models"
- TEST_CASES="./spec/controllers ./spec/views"
- TEST_CASES="./spec/requests ./spec/helpers ./spec/mailers"
- TEST_CASES="./spec/features/admin"
- TEST_CASES="./spec/features/consumer"
#- TEST_CASES="./spec/routing"
before_script:
- cp config/database.travis.yml config/database.yml
- psql -c 'create database open_food_network_test;' -U postgres
- cp config/application.yml.example config/application.yml
- RAILS_ENV=test bundle exec rake db:create db:schema:load
script:
- RAILS_ENV=test bundle exec rake db:migrate --trace
- bundle exec rake spec
- "bundle exec rspec $TEST_CASES"
notifications:
email: false