Run tests in parallel across multiple workers on Snap CI.
Note: This gem is already installed on Snap CI - you need not do anything to install it, just start using it.
$ gem install snap_ci-parallel_tests
Or alternatively:
Add this line to your application's Gemfile:
gem 'snap_ci-parallel_tests'
And then execute:
$ bundle
Ruby version support: We will supporting this gem only with ruby 2.2.4. If there is reason you would like to use this gem with some other version of ruby, please get in touch with us by writing to [email protected]
Depending on the framework of your choice -
$ [bundle exec] snap-ci-parallel-rspec [options] [files or directories] [-- [rspec options]]
$ [bundle exec] snap-ci-parallel-test [options] [files or directories] [-- [Test::Unit or MiniTest options]]
$ ./your-test-suite $([bundle exec] snap-ci-parallel-partition [options] [files or directories])
Ensure that 'snap_ci-parallel_tests' is present in your development group
# Gemfile
gem "snap_ci-parallel_tests", :group => :development
$ bundle exec snap-ci-parallel-rspec [options] [files or directories] [-- [rspec options]]
$ bundle exec snap-ci-parallel-test [options] [files or directories] [-- [Test::Unit or MiniTest options]]
Alternatively -
$ bundle exec rake snap-parallel # to run all specs
$ bundle exec rake snap-parallel:models # to run only model specs
$ bundle exec rake snap-parallel:controllers # to run only controllers specs
$ bundle exec rake -T snap-parallel # to list all tasks
- Fork it ( https://github.com/[my-github-username]/parallel-tests/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request