I’m using Cypress integration tests in a CircleCI environment. Currently my CircleCI configuration fails to store the test reports as artifacts and include a summary. The screenshots and videos are successfully stored. Below I’m including the config.yml
and a screenshot of the CircleCI dashboard.
I’ve consulted these pages of the CircleCI documentation:
Any pointers would be appreciated. Thank you!
config.yml
version: 2
jobs:
build:
working_directory: ~/nodefront
docker:
- image: cypress/base:6
environment:
TERM: xterm
parallelism: 1
steps:
- checkout
- restore_cache:
name: Restoring cached yarn dependencies
key: v3-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}
- run:
name: Installing dependencies with yarn
command: |
yarn install --frozen-lockfile
yarn list
- save_cache:
name: Caching yarn dependencies
key: v3-deps-{{ checksum "package.json" }}
paths:
- ~/.cache
- run: mkdir -p integration-tests/test-results/junit integration-tests/cypress/videos integration-tests/cypress/screenshots
- run:
name: Running E2E tests with JUnit reporter
command: $(yarn bin)/cypress run --project ./integration-tests --reporter junit --record --key 77ffe06e-0fe2-4b33-a5ff-4dcdf9e31c91
environment:
MOCHA_FILE: integration-tests/test-results/junit/test-results-[hash].xml
when: always
- store_test_results:
path: integration-tests/test-results
- store_artifacts:
path: integration-tests/test-results
- store_artifacts:
path: integration-tests/cypress/videos
- store_artifacts:
path: integration-tests/cypress/screenshots
Screenshots