Skip to content

Commit

Permalink
Help supporting 0 indexing
Browse files Browse the repository at this point in the history
  • Loading branch information
ipepe committed Nov 28, 2024
1 parent c9c01cf commit 0e42d0f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ bundle add rspec-big-split

### Options

By default, this script splits tests by files into workers. If you want to split by examples, pass `--split-by-example`
* 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 from `0` and you want to start from `1`.


## Example project

Expand Down
2 changes: 2 additions & 0 deletions exe/rspec-big-split
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ require "json"
total_workers = ENV.fetch("TEST_NODE_TOTAL", "1").to_i
this_worker_index = ENV.fetch("TEST_NODE_INDEX", "1").to_i

this_worker_index += 1 if ARGV.include?("--add-one-on-test-node-index")

warn "TEST_NODE_TOTAL=#{total_workers}"
warn "TEST_NODE_INDEX=#{this_worker_index}"

Expand Down
2 changes: 1 addition & 1 deletion lib/rspec/big/split/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module Rspec
module Big
module Split
VERSION = "0.3.2"
VERSION = "0.3.3"
end
end
end

0 comments on commit 0e42d0f

Please sign in to comment.