Static site generator Gatsby is all the rage these days. It pairs nicely with quick deploys using Netlify. In this blog post I will show how to test your site using Cypress.io in several situations.
- when running Gatsby locally during development
- on Netlify before deploying
- on CircleCI after deploying against the newly deployed URL
You can find the source at bahmutov/gatsby-starter-blog - it is a fork of the Gatsby's own example. I have the deployed blog running at https://gatsby-blog-0a5be4.netlify.com/.
The deployed sites itself has the 3 mini blog posts that describe the local setup, the Netlify command and how Netlify triggers CircleCI build using a webhook after each deploy.
So read the blog posts https://gatsby-blog-0a5be4.netlify.com/, explore the source, and ping me with any questions.
PS: the immutable deploys and testing go hand in hand. See how to perform them from CI using Zeit Now in the blog post Immutable deploys and Cypress