Hey,
We have a React client application that we’re running as a background process during our tests.
The app was bootstrapped with create-react-app.
After running the app as a background process, we then run our unit/integration tests (with Jest) and our E2E tests (with Cypress). The Cypress tests require the app to be running in the background.
Occasionally, the step to run the app fails with this message:
The build failed because the process exited too early. This probably means the system ran out of memory or someone called
kill -9
on the process.
error Command failed with exit code 1.
Exited with code 1
This subsequently causes the Cypress tests to fails.
Is there anything we can do to prevent this/debug why the process failed?
Our circle.yml is:
version: 2
jobs:
build:
docker:
# specify the version you desire here
- image: cypress/base:6
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/mongo:3.4.4
working_directory: ~/repo
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run: yarn install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- run:
name: Background the app
command: yarn start --silent
background: true
- run: yarn test
- run:
name: Run E2E tests
command: $(npm bin)/cypress run --record
when: on_success
Thanks for any help!