https://cypress.io logo
Running Cypress Tests in Cloud Build
# i-need-help
r
Is it possible to run cypress tests in Cloud Build ? I checked the cypress documentation , i cant seem to find an example where you are running cypress tests in Cloud build. https://github.com/cypress-io/cypress-example-kitchensink#ci-status
a
Tests don't RUN in Cypress Cloud, they run locally or in CI or wherever, on your own hardware, and they REPORT to Cypress Cloud (if you pay for it).
m
> (if you pay for it) See also the free-plan option https://www.cypress.io/pricing
@red-diamond-5625 In https://github.com/cypress-io/cypress-example-kitchensink#ci-status each of the CI providers which shows a status badge is running CI in their environment e.g. CircleCI and recording the results to Cypress Cloud. What did you mean by "Cloud Build"? I don't know that term.
a
Oh I didn’t even see there was a free plan. We’ve had more than 3 users since day 1 so we just went straight to paid, but good catch.
m
The free plan is good for trying out the Cypress Cloud and perhaps even for individual contributors. Serious commercial use is most likely to need one of the paid options.
r
@many-airline-45402 I meant running cypress tests in the Google Cloud Build , I'm looking for a cloudbuild.yaml file that i can use as an example and that has best practices. I did some research and this is what I could find https://qaautomationlabs.com/cypress-google-cloud-build-int/
m
Thank you for explaining that you were referring to Google Cloud Build! Unfortunately this is not one of the CI providers that are listed on https://docs.cypress.io/guides/continuous-integration/ci-provider-examples (so there are no ready-made examples there to refer to). The link you found uses an example running with a legacy version of Cypress and it is not the simplest of examples, but it may still work.
r
In future are we looking into adding google cloud build in the ci providers examples ?
m
You could request this in https://github.com/cypress-io/cypress-documentation/issues/new/choose or perhaps you could ask Google Cloud Build to provide an example of running Cypress in their environment?
The closest I could find was https://cloud.google.com/build/docs/building/build-nodejs (although this does not use Cypress). It's interesting to see that the example https://github.com/GoogleCloudPlatform/cloud-build-samples/tree/main/node-example-npm is hosted on GitHub. You could request a Cypress example via https://github.com/GoogleCloudPlatform/cloud-build-samples/issues perhaps. If you are not locked into Google Cloud, then you might also want to consider using https://github.com/cypress-io/github-action
r
thank you @many-airline-45402 for investigating further, i opened a request on the cypress issue board. I will also share my findings. I'm actually locked into Google Cloud as this is used by the organisation.
m
Thank you @red-diamond-5625 for following up. I see your request logged under https://github.com/cypress-io/cypress-documentation/issues/5238 and I hope that someone will be able to provide you with an up-to-date example for running Cypress in Google Cloud Build!
2 Views