Cypress docker gitlab example failing in test stage
See original GitHub issueCurrent behavior:
I’m trying to add Cypress to the pipeline on Gitlab using this example cypress-example-docker-gitlab. When it goes to the cypress-e2e
or cypress-e2e-chrome
job it fails.
The error message says: ERROR: No files to upload
Desired behavior:
It should run the job correctly.
Steps to reproduce: (app code and test code)
# .gitlab-ci.yml
# I'm using yarn
stages:
- build
- test
variables:
npm_config_cache: /builds/vctormb/testing-cypress/.npm
CYPRESS_CACHE_FOLDER: /builds/vctormb/testing-cypress/cache/Cypress
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- ~/.cache
install:
image: cypress/base:10
stage: build
script:
- yarn install --frozen-lockfile
- $(yarn bin)/cypress verify
cypress-e2e:
image: cypress/base:10
stage: test
script:
- $(yarn bin)/cypress run
artifacts:
expire_in: 1 week
when: always
paths:
- cypress/screenshots
- cypress/videos
cypress-e2e-chrome:
image: cypress/browsers:chrome67
stage: test
script:
- $(yarn bin)/cypress run --browser chrome
artifacts:
expire_in: 1 week
when: always
paths:
- cypress/screenshots
- cypress/videos
Versions
“cypress”: “3.2.0”
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Cypress integration test using docker-compose passes locally ...
A cypress test that tests websocket connection behavior fails in GitLab CI. The actual pipeline is passing, but that is only so that...
Read more >GitLab CI - Cypress Documentation
The example below is basic CI setup and job using GitLab CI/CD to run Cypress tests within the Electron browser. This GitLab CI...
Read more >Run your Cypress E2E Tests in GitLab CI — Complete Guide
Let's put everything in another job, e2e tests . We will run this job in parallel to the unit tests by assigning the...
Read more >Why Cypress service is failing? - docker - Stack Overflow
Below is my pipeline on which I'm trying to get Cypress job to run tests against Nginx service (which ...
Read more >Running Cypress in Gitlab CI - jessie.codes
I ran into some difficulties a few weeks ago when attempting to run Cypress tests as part of my CI script in Gitlab....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@vctormb yes, we are using
--record
to send test results to our dashboard, if you are not a subscriber, just usecypress run
(and run a single job)We used to have this issue as well. The problem is getting the cypress binary to cache correctly with yarn since yarn doesn’t actually install the cypress binary. Our pipeline which works looks like so
I would recommend trying npm instead of yarn for any cypress stuff just because it typically works better. .Currently we just have a docker image with the cypress binary pre-installed which allows your pipelines to run much quicker. That’s a possible work around if the above doesn’t work