Skip to content

Instantly share code, notes, and snippets.

@ryanpedersen42
Last active July 2, 2020 18:09
Show Gist options
  • Save ryanpedersen42/f04543460fec2caa520055c35d2f43a2 to your computer and use it in GitHub Desktop.
Save ryanpedersen42/f04543460fec2caa520055c35d2f43a2 to your computer and use it in GitHub Desktop.
jobs:
test:
<executor removed for brevity>
# set the number of containers to split the tests across
parallelism: 2
steps:
<checkout steps removed for brevity>
# create directory to store test results
- run: mkdir ~/junit
- run:
name: Test application
command: |
TEST=$(circleci tests glob **/{*test.js,!node_modules} | circleci tests split --split-by=timings)
yarn test $TEST
# copy test results into directory created above
- run:
command: cp junit.xml ~/junit/
when: always
# store test results !!need this to have timing data available!!
- store_test_results:
path: ~/junit
# store test results as artifact as well
- store_artifacts:
path: ~/junit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment