Skip to content

Instantly share code, notes, and snippets.

@hagiyat
Last active April 8, 2016 14:50
Show Gist options
  • Save hagiyat/7c15741b6b7f7b035872 to your computer and use it in GitHub Desktop.
Save hagiyat/7c15741b6b7f7b035872 to your computer and use it in GitHub Desktop.
test-queue on wercker
# only run spec
box: nanapi/ubuntu-rvm-with-phantomjs@0.0.2
no-response-timeout: 10
services:
- ibash/mysql5.6
build:
steps:
- script:
name: set timezone
code: |
export TZ="Asia/Tokyo"
- rvm-use:
version: 2.2.0
- bundle-install:
jobs: 4
- rails-database-yml:
service: mysql
- script:
name: echo ruby information
code: |
echo "ruby version $(ruby --version) running"
echo "from location $(which ruby)"
echo -p "gem list: $(gem list)"
- script:
name: set up db
code: |
RAILS_ENV='test' bundle exec rake db:create
RAILS_ENV='test' bundle exec rake db:structure:load
RAILS_ENV='test' bundle exec rake db:create TEST_ENV_NUMBER=2
RAILS_ENV='test' bundle exec rake db:structure:load TEST_ENV_NUMBER=2
RAILS_ENV='test' bundle exec rake db:create TEST_ENV_NUMBER=3
RAILS_ENV='test' bundle exec rake db:structure:load TEST_ENV_NUMBER=3
RAILS_ENV='test' bundle exec rake db:create TEST_ENV_NUMBER=4
RAILS_ENV='test' bundle exec rake db:structure:load TEST_ENV_NUMBER=4
- script:
name: run rspec
code: |
TEST_QUEUE_WORKERS=4 bin/rspec-queue spec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment