Skip to content

Instantly share code, notes, and snippets.

@0sc
Created March 12, 2017 11:36
Show Gist options
  • Save 0sc/0614629093d8d7d944c787add642fce7 to your computer and use it in GitHub Desktop.
Save 0sc/0614629093d8d7d944c787add642fce7 to your computer and use it in GitHub Desktop.
parallelising RSpec test with docker
version: '2'
services:
feature_tests:
image: project/image:ci
container_name: features_tests
command: bash -c "service postgresql start; sleep 1m; xvfb-run -a rspec spec/features"
controller_tests:
image: project/image:ci
container_name: controller_tests
command: bash -c "service postgresql start; sleep 1m; rspec spec/controllers"
helper_tests:
image: project/image:ci
container_name: helper_tests
command: bash -c "service postgresql start; sleep 1m; rspec spec/helpers"
interactor_tests:
image: project/image:ci
container_name: interactor_tests
command: bash -c "service postgresql start; sleep 1m; rspec spec/interactors"
lib_tests:
image: project/image:ci
container_name: lib_tests
command: bash -c "service postgresql start; sleep 1m; rspec spec/lib"
mailer_tests:
image: project/image:ci
container_name: mailer_tests
command: bash -c "service postgresql start; sleep 1m; rspec spec/mailers"
model_tests:
image: project/image:ci
container_name: model_tests
command: bash -c "service postgresql start; sleep 1m; rspec spec/models"
presenter_tests:
image: project/image:ci
container_name: presenter_tests
command: bash -c "service postgresql start; sleep 1m; rspec spec/presenters"
services_tests:
image: project/image:ci
container_name: services_tests
command: bash -c "service postgresql start; sleep 1m; rspec spec/services"
view_tests:
image: project/image:ci
container_name: view_tests
command: bash -c "service postgresql start; sleep 1m; rspec spec/views"
worker_tests:
image: project/image:ci
container_name: worker_tests
command: bash -c "service postgresql start; sleep 1m; rspec spec/workers"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment