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 9fb0aff
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
1 change: 1 addition & 0 deletions .buildkite/pipelines/pull_request/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ steps:

- command: .buildkite/scripts/steps/test/jest.sh
label: 'Jest Tests'
pallelism: 4
agents:
queue: c2-16
timeout_in_minutes: 120
Expand Down
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
15 changes: 15 additions & 0 deletions .buildkite/scripts/steps/test/jest_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

JOB=$BUILDKITE_PARALLEL_JOB
JOB_COUNT=$BUILDKITE_PARALLEL_JOB_COUNT

i=0

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 9fb0aff

Please sign in to comment.