-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci] Run Jest tests in parallel (#115687)
* [ci] Run Jest tests in parallel Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co> * Disable coverage Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co> * Make hourly match prs Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co> * Update timeout Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co> * mock process.execArgv so that it is consistent * Remove comment Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: spalger <spalger@users.noreply.github.com>
- Loading branch information
1 parent
38213cd
commit 237d68d
Showing
14 changed files
with
66 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
set -uo pipefail | ||
|
||
JOB=$BUILDKITE_PARALLEL_JOB | ||
JOB_COUNT=$BUILDKITE_PARALLEL_JOB_COUNT | ||
|
||
# a jest failure will result in the script returning an exit | ||
# code of 10 | ||
|
||
i=0 | ||
exitCode=0 | ||
|
||
find src x-pack packages -name jest.config.js -not -path "*/__fixtures__/*" | sort | while read config; do | ||
if [ "$(($i % $JOB_COUNT))" -eq $JOB ]; then | ||
echo "--- $ node scripts/jest --config $config" | ||
node --max-old-space-size=5632 ./node_modules/.bin/jest --config=$config --runInBand --coverage=false | ||
|
||
if [ $? -ne 0 ]; then | ||
exitCode=10 | ||
echo "^^^ +++" | ||
fi | ||
fi | ||
|
||
((i=i+1)) | ||
done | ||
|
||
exit $exitCode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
packages/kbn-securitysolution-list-constants/jest.config.js
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters