Skip to content
7 changes: 6 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,12 @@ jobs:
react-version: << parameters.react-version >>
- run:
name: Test JSDOM
command: pnpm test:unit:jsdom
command: |
# Fully saturate all the available CPUs by splitting the tests in 1 shard per CPU
pnpm exec concurrently "pnpm test:unit:jsdom --reporter=blob --shard=1/2" "pnpm test:unit:jsdom --reporter=blob --shard=2/2" || TEST_EXIT_CODE=$?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose circleci never implemented a proper way to detect cores 😆

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if I'm not mistaken, availableParallelism detects correct amount of logical CPUs in circle ci. just feels a bit like overkill to write a wrapper script for this.

pnpm exec vitest run --merge-reports
# Reports merged, we can now exit with the stored code
exit ${TEST_EXIT_CODE:-0}
- store_test_results:
path: test-results
test_browser:
Expand Down
Loading