Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file lib/rspec/big/split
. To experiment with that code, run bin/console
for an interactive prompt.
TODO: Delete this and the text above, and describe your gem
Execute this command to add gem to your application's Gemfile:
bundle add rspec-big-split
- Add
ci_split_example_groups: true
as metadata to your example groups (only for big files). - Generate tests map with:
bundle exec rspec --dry-run --format Rspec::Big::Split::Formatter --out tmp/rspec_splitter.json
- Define variables like
TEST_NODE_TOTAL=20
andTEST_NODE_INDEX=1
in your CI/CD configuration.- Make sure that your indexing starts with
1
and ends equal toTEST_NODE_TOTAL
.
- Make sure that your indexing starts with
- (optional) Printout tests that will be run in current node:
bundle exec rspec-big-split tmp/rspec_splitter.json
- Run tests with
bundle exec rspec $(bundle exec rspec-big-split tmp/rspec_splitter.json)
to run tests on each node.
- By default, this script splits tests by files into workers. If you want to split by examples, pass
--split-by-example
- You can use
--add-one-on-test-node-index
to modify the index of the test node. This is useful when your CI starts indexing from0
and you want to start from1
.
TODO: Add link to example project