cypress-io / cypress-example-kitchensink

This is an example app used to showcase Cypress.io testing.
https://example.cypress.io/
MIT License
1.2k stars 2.2k forks source link

Deploy example.cypress.io automatically #168

Open bahmutov opened 5 years ago

bahmutov commented 5 years ago

Maybe as a semantic action?

Because there might be changes incompatible with previous test runner versions, we need to version deploys. I think best would be to use this package.json own version or Cypress version. Deployed pages would be like (if we use Cypress version)

http://example.cypress.io/3.1.1/commands/querying
http://example.cypress.io/3.1.4/commands/querying

right now old versions of Cypress probably could be broken if we change example.cypress.io layout or page

So this would work for the current version of Cypress (installed as a dependency in this package.json file), but what about future versions? If we prepare to release version 4.0.0 of Cypress, we probably need to branch this repo and have 4.0.0 anyway. So when deploying we need to

We also need to be able to override the version and deploy x.y.z as needed to "fill" missing version

Note: it would be simple to deploy this package under its own version, but then the users would be really confused because they would see urls like http://example.cypress.io/1.1.0/... that do not match Cypress test runner version

bahmutov commented 5 years ago

Ok, so the top level is deployed from "cypress-io/cypress" repo. We should still deploy from this repo under cypress versioned subfolders like /3.1.4 etc. This way we switch the "head" example pages, but also can keep updating them from this repo and they are tested and refreshed

bahmutov commented 5 years ago

My goal is to make it much simpler and faster to create new tests and examples for the users and deploy them. Right now it is pretty much impossible - we have a lot of updated examples, but have not released new version of Cypress and have not deployed the head examples.cypress.io. With this change we can keep updating the examples and it is working with the current version and we can point people at https://example.cypress.io/3.1.1/commands/assertions for example after redeploying