Configure parallel tests with Ruby (RSpec) - Amazon CodeBuild
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Configure parallel tests with Ruby (RSpec)

The following is sample of a buildspec.yml that shows parallel test execution with RSpec on an Ubuntu platform:

version: 0.2 batch: fast-fail: false build-fanout: parallelism: 5 ignore-failure: false phases: install: commands: - echo 'Installing Ruby dependencies' - apt-get update - apt-get install -y ruby ruby-dev build-essential - gem install bundler - bundle install build: commands: - echo 'Running Ruby Tests' - | codebuild-tests-run \ --test-command 'bundle exec rspec' \ --files-search "codebuild-glob-search 'spec/**/*_spec.rb'" \ --sharding-strategy 'equal-distribution' post_build: commands: - echo "Test execution completed"