cli
cli copied to clipboard
chore: find a better more automatic way to distribute our tests
Follow up to https://github.com/netlify/cli/pull/4164.
In https://github.com/netlify/cli/pull/4164 we split our tests across multiple machines using an ava
feature that allows it.
The feature works by sorting specs by file names, dividing those into chunks and sending each chunk to a different machine.
As a result of ava
's distribution strategy and since some of our specs are slower than others, I manually distributed the tests using a naming scheme (prefixing with numbers).
See a suggestion in https://github.com/netlify/cli/pull/4164#discussion_r798675380. Another possible option is to have a lint rule to enforce a maximum number of tests in a spec, to keep each spec execution time low
We could possibly contribute to https://github.com/avajs/eslint-plugin-ava
Opened https://github.com/avajs/ava/issues/2965 for reference
Moving away from ava