Closed Thorbenl closed 1 year ago
They @Thorbenl sorry for the late response on this. You need to be able to separate this out into 2 jobs.
cypress/install
jobcypress/run
jobYou can see an example here: https://github.com/cypress-io/circleci-orb#parallel
This should provide you want you are looking for
Hi :)
I want to preface this with: Cypress is amazing. We would really want to use it, but hit a roadblock along the way, which we hope you can help us with/assist a bit.
Our setup
The setup works like this: We have a
Django
backend, and aReact
frontend. We built theReact
+ other client files we need and put the relevant info in thestatic/dist
folder, which is cached. Basically a compiled react-app with a few bundles.. Then we boot the django server to serve these static frontend files, since we also need a DB for these functional tests to run, and want to runCypress
against this. We also cache thenode_modules
folder after installation, because that also has the cypress files. Here is the config:Orb verison 1.29.0
CircleCI Config:
Problem Description
We would like to use the orb, so we can use its caching, and also parallel running is important for us, as we have up to 50 functional tests running now.
We aren't sure on how we can achieve this. We know we can use the
cypress/run`` job, but we dont know how to tell it "hey orb, use the
node_modulescache from the previous job (
build_frontendjob), since we dont want to run
cypress/install, since cypress is already available and installed in the
build_frontendjob.
We tried:and do that in the
steps
inside thefunctional_test
job.Sorry if this is a bit cluttered. I am happy to explain further, if necessary.