I am trying to set up Cypress end-to-end tests for a Vue SPA application that has to connect to a Laravel backend; the tests are to run in a Jenkins pipeline. This is practically straight forward in a local development environment. Basically:
- Use docker-compose to spin up Laravel and DB
- Use docker to spin up the SPA and then exec
cypress runinside the container
However, I can't seem to think of an optimal way to set up something like that in a Jenkins pipeline. The SPA and Laravel are in separate repositories and I do not want to pull the one into the other while running the CI process; the thought itself seems messy.
So, basically, what is an optimal way to set up a Jenkins pipeline that does end-to-end cypress tests for a Vue SPA that has to connect to a Laravel API/MySQL DB?
This is my very first SO question and I apologise in advance if there are any rules I breached while creating it.