I’m using CircleCI to run some tests using jest and then run DangerJS in a subsequent job. The idea is that if the tests fail, the test-results.json output will be picked up by danger so a bot can list the failing tests in a comment on the PR.
I’m running the tests in a job, and in the next job that’s running danger, I’m looking to grab the test-results.json file. Initially I was doing
- persist_to_workspace:
root: /root/workspace
paths:
- coverage
- test-results.json
in the test job. The only problem is that when the tests fail, the persist_to_workspace
command doesn’t seem to run, and I can’t find a way to force it. I don’t want to store_test_results or store_artifacts from what I can see… Any help would be much appreciated.