We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For example Circle CI can provide CIRCLE_NODE_INDEX and CIRCLE_NODE_TOTAL env. variables. Naive implementation of splitting can look like this.
CIRCLE_NODE_INDEX
CIRCLE_NODE_TOTAL
class Runner { ... public function run() { ... $nodeIndex = (int) getenv('CIRCLE_NODE_INDEX'); $nodeTotal = (int) getenv('CIRCLE_NODE_TOTAL'); if ($nodeTotal) { $this->jobs = array_values(array_filter( $this->jobs, function (int $jobIndex) use ($nodeIndex, $nodeTotal) { return ($jobIndex % $nodeTotal) === $nodeIndex; }, ARRAY_FILTER_USE_KEY )); }
Better implementation should automatically balance the tests based on the time it took to execute them in previous run.
The text was updated successfully, but these errors were encountered:
Alternative (and quite possibly better approach) is to add new CLI option to print tests names to stdout and let them be processed by another tool.
For example Circle CI does provide picard tool to split the tests. So the final command would look sth like
tester --find-tests ./tests | picard | xargs tester -c ./tests/php.ini
Sorry, something went wrong.
No branches or pull requests
For example Circle CI can provide
CIRCLE_NODE_INDEX
andCIRCLE_NODE_TOTAL
env. variables. Naive implementation of splitting can look like this.Better implementation should automatically balance the tests based on the time it took to execute them in previous run.
The text was updated successfully, but these errors were encountered: