language: ruby
addons:
  postgresql: "9.4"
rvm:
 - "2.3.2"
cache: bundler
bundler_args: --without development
before_script:
  - "for i in config/*.example; do cp \"$i\" \"${i/.example}\"; done"
  - bundle exec rake db:setup
script:
  - "bundle exec rake assets:precompile RAILS_ENV=test"
  - "bin/knapsack_pro_rspec"
env:
  global:
    - KNAPSACK_PRO_FIXED_QUEUE_SPLIT=true
    - KNAPSACK_PRO_CI_NODE_TOTAL=2
  matrix:
    - KNAPSACK_PRO_CI_NODE_INDEX=0
    - KNAPSACK_PRO_CI_NODE_INDEX=1
