Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
  • Loading branch information
Tyler Smalley committed Oct 19, 2021
1 parent 1a5570b commit d81d894
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .buildkite/scripts/steps/test/jest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ is_test_execution_step
.buildkite/scripts/bootstrap.sh

echo '--- Jest'
checks-reporter-with-killswitch "Jest Unit Tests" \
node scripts/jest --ci --verbose --maxWorkers=10
checks-reporter-with-killswitch "Jest Unit Tests $((BUILDKITE_PARALLEL_JOB+1))}" \
.buildkite/scripts/steps/test/jest_parallel.sh
13 changes: 13 additions & 0 deletions .buildkite/scripts/steps/test/jest_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

i=0
JOB=$BUILDKITE_PARALLEL_JOB
JOB_COUNT=$BUILDKITE_PARALLEL_JOB_COUNT
find src x-pack packages -name jest.config.js | while read config; do
if !(($i % $JOB_COUNT == $JOB)); then
echo "--- running $config"
node --expose-gc ./node_modules/.bin/jest --config $config --runInBand --logHeapUsage
fi

((i=i+1))
done

0 comments on commit d81d894

Please sign in to comment.