Hello,
I have a monorepo setup which runs a large set of tests on commits to master. If a test fails I don't receive the full output of the failing test suite, in the logs of the pipline, so cannot determine what test failed.
Does anyone know why I wouldn't be getting the full all the logs? It consistently happens running React unit tests with React Testing Library using the circleci/node:16.7-browsers image. Here is the step definition:
Hi @Adam Whiteland,
I'm not really sure what output you are missing from the Pipelines log. Do you see additional output when you run these failed tests locally that is not in the Pipelines log?
If you have a computer with more than 4GB memory available, I would suggest as a first step to debug this build locally with the same Docker image, and see if you get the same output as in Pipelines or not.
You can do this the following way:
1. Take a new clone of the repo on your machine (don't use an existing one)
2. Navigate to the directory of that new clone, and do a git reset --hard to the commit of the failed build with the issue
3. Afterwards, start a Docker container with the following command
docker run -it --volume=/Users/myUserName/code/my-repo:/localDebugRepo --workdir="/localDebugRepo" --memory=4g --memory-swap=4g --memory-swappiness=0 --cpus=4 --entrypoint=/bin/bash circleci/node:16.7-browsers
Replace /Users/myUserName/code/my-repo in the command with the path of the clone you took on step 1.
4. After the Docker container starts, you can run the commands of the script in your yml file (in this case npm run test) and observe the output. Do you see in the output of that command additional output that is not in the Pipelines log?
Kind regards,
Theodora
Thanks for your reply @Theodora Boudale, I'll definitely give this a go and get back to you with my results.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are very welcome Adam, I will wait for your update then!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.