|
| 1 | +# Kitchen Sink [![renovate-app badge][renovate-badge]][renovate-app] [![semantic-release][semantic-image] ][semantic-url] |
| 2 | + |
| 3 | +This is an example app used to showcase [Cypress.io](https://www.cypress.io/) testing. The application uses every API command in Cypress for demonstration purposes. Additionally this example app is configured to run tests in various CI platforms. The [tests](https://github.com/cypress-io/cypress-example-kitchensink/tree/master/cypress/e2e) are also heavily commented. For a full reference of our documentation, go to [docs.cypress.io](https://docs.cypress.io/). |
| 4 | + |
| 5 | +To see the kitchen sink application, visit [example.cypress.io](https://example.cypress.io/). |
| 6 | + |
| 7 | +[renovate-badge]: https://img.shields.io/badge/renovate-app-blue.svg |
| 8 | +[renovate-app]: https://renovateapp.com/ |
| 9 | +[semantic-image]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg |
| 10 | +[semantic-url]: https://github.com/semantic-release/semantic-release |
| 11 | + |
| 12 | +## CI Status |
| 13 | + |
| 14 | +The following table lists live workflows from various CI providers. These each independently test the contents of this example repository. They run and record using [Cypress Cloud](https://on.cypress.io/guides/cloud/introduction) with their results displaying centrally under Cypress Cloud [ProjectId `4b7344`](https://cloud.cypress.io/#/projects/4b7344/runs). Each CI provider shows its build status on its own site: |
| 15 | + |
| 16 | +CI Provider | Workflow | Build Status | |
| 17 | +:--- | :--- | :--- | |
| 18 | +[AppVeyor][AppVeyor docs] | [appveyor.yml][AppVeyor workflow] | [![AppVeyor CI][AppVeyor badge]][AppVeyor log] | |
| 19 | +[CircleCI][CircleCi docs] | [.circleci/config.yml][CircleCI workflow] | [![CircleCI][CircleCI badge]][CircleCI log] | |
| 20 | +[**cypress-io/github-action**][Cy GitHub Actions docs] | [using-action.yml][Cy GitHub Actions workflow] | [![Cypress GHA status][Cy GitHub Actions badge]][Cy GitHub Actions log] |
| 21 | +[GitHub Actions][GitHub Actions docs] | [parallel.yml][GitHub Actions workflow] | [![Parallel tests status][GitHub Actions badge]][GitHub Actions log] |
| 22 | +[Netlify][Netlify docs] | [netlify.toml][Netlify workflow] | [![Netlify Status][Netlify badge]][Netlify log] |
| 23 | + |
| 24 | +<!-- CI provider links --> |
| 25 | +[AppVeyor docs]: https://www.appveyor.com/docs/ |
| 26 | +[AppVeyor badge]: https://ci.appveyor.com/api/projects/status/bo4x59pha1eb18de/branch/master?svg=true |
| 27 | +[AppVeyor log]: https://ci.appveyor.com/project/cypress-io/cypress-example-kitchensink |
| 28 | +[AppVeyor workflow]: appveyor.yml |
| 29 | + |
| 30 | +[CircleCI docs]: https://circleci.com/docs/ |
| 31 | +[CircleCI badge]: https://circleci.com/gh/cypress-io/cypress-example-kitchensink/tree/master.svg?style=shield |
| 32 | +[CircleCI log]: https://circleci.com/gh/cypress-io/cypress-example-kitchensink/tree/master |
| 33 | +[CircleCI workflow]: .circleci/config.yml |
| 34 | + |
| 35 | +[Cy GitHub Actions docs]: https://github.com/cypress-io/github-action#readme |
| 36 | +[Cy GitHub Actions badge]: https://github.com/cypress-io/cypress-example-kitchensink/actions/workflows/using-action.yml/badge.svg |
| 37 | +[Cy GitHub Actions log]: https://github.com/cypress-io/cypress-example-kitchensink/actions/workflows/using-action.yml?query=branch%3Amaster |
| 38 | +[Cy GitHub Actions workflow]: https://github.com/cypress-io/cypress-example-kitchensink/actions/workflows/using-action.yml |
| 39 | + |
| 40 | +[GitHub Actions docs]: https://docs.github.com/en/actions |
| 41 | +[GitHub Actions badge]: https://github.com/cypress-io/cypress-example-kitchensink/actions/workflows/parallel.yml/badge.svg |
| 42 | +[GitHub Actions log]: https://github.com/cypress-io/cypress-example-kitchensink/actions/workflows/parallel.yml?query=branch%3Amaster |
| 43 | +[GitHub Actions workflow]: .github/workflows/parallel.yml |
| 44 | + |
| 45 | +[Netlify docs]: https://docs.netlify.com/ |
| 46 | +[Netlify badge]: https://api.netlify.com/api/v1/badges/016bd76b-ebfd-4071-94d9-8668afbb56f7/deploy-status?branch=master |
| 47 | +[Netlify log]: https://app.netlify.com/sites/cypress-example-kitchensink/deploys |
| 48 | +[Netlify workflow]: netlify.toml |
| 49 | + |
| 50 | +You can find all CI results recorded on the Cypress Cloud |
| 51 | +[](https://cloud.cypress.io/projects/4b7344/runs) |
| 52 | +## CI Workflow Examples |
| 53 | + |
| 54 | +This table shows additional documentation-only examples of CI workflows. These are **not** live examples as in the table above and they may require modification before use. |
| 55 | + |
| 56 | +CI Provider | Basic Config | Full Parallel Config |
| 57 | +:--- | :--- | :--- |
| 58 | +[AWS Amplify][AWS Amplify docs] | [amplify.yml](amplify.yml) | |
| 59 | +[AWS CodeBuild][AWS CodeBuild docs] | [basic/buildspec.yml](./basic/buildspec.yml) | [buildspec.yml](buildspec.yml) |
| 60 | +[Azure Pipelines][Azure Pipelines docs] | [basic/azure-ci.yml](basic/azure-ci.yml) | [azure-ci.yml](azure-ci.yml) |
| 61 | +[Buddy.works][Buddy.works docs] | [buddy.yml](buddy.yml) |
| 62 | +[Buildkite][Buildkite docs] | [.buildkite/pipeline.yml](.buildkite/pipeline.yml) |
| 63 | +[CircleCI][CircleCi docs] | [basic/.circleci/config.yml](basic/.circleci/config.yml) |
| 64 | +[CloudBees CodeShip Pro][CloudBees CodeShip Pro docs] | [basic/codeship-pro](basic/codeship-pro) |
| 65 | +[GitHub Actions][GitHub Actions docs] | [single.yml](.github/workflows/single.yml) |
| 66 | +[GitLab][GitLab docs] | [basic/.gitlab-ci.yml](basic/.gitlab-ci.yml) | [.gitlab-ci.yml](.gitlab-ci.yml) |
| 67 | +[Jenkins][Jenkins docs] | [basic/Jenkinsfile](basic/Jenkinsfile) | [Jenkinsfile](Jenkinsfile) |
| 68 | +[Semaphore 2.0][Semaphore 2.0 docs] | [basic/.semaphore.yml](basic/.semaphore.yml) | [.semaphore/semaphore.yml](.semaphore/semaphore.yml) |
| 69 | +[Travis CI][Travis CI docs] | [basic/.travis.yml](basic/.travis.yml) | [.travis.yml](.travis.yml) |
| 70 | + |
| 71 | +<!-- CI provider doc links --> |
| 72 | +[AWS Amplify docs]: https://docs.amplify.aws/ |
| 73 | +[AWS CodeBuild docs]: https://docs.aws.amazon.com/codebuild/ |
| 74 | +[Azure Pipelines docs]: https://learn.microsoft.com/en-us/azure/devops/pipelines/ |
| 75 | +[Buddy.works docs]: https://buddy.works/docs |
| 76 | +[Buildkite docs]: https://buildkite.com/docs |
| 77 | +[CloudBees CodeShip Pro docs]: https://docs.cloudbees.com/docs/cloudbees-codeship/ |
| 78 | +[GitLab docs]: https://docs.gitlab.com/ee/ci/yaml/ |
| 79 | +[Jenkins docs]: https://www.jenkins.io/doc/ |
| 80 | +[Semaphore 2.0 docs]: https://docs.semaphoreci.com/ |
| 81 | +[Travis CI docs]: https://docs.travis-ci.com/ |
| 82 | + |
| 83 | +The Cypress documentation page [CI Provider Examples](https://docs.cypress.io/guides/continuous-integration/ci-provider-examples) provides some more examples with extensive guides for using Cypress with some of the most popular CI providers. |
| 84 | + |
| 85 | +## CI Community Examples |
| 86 | + |
| 87 | +CI | Link |
| 88 | +:--- | :--- | |
| 89 | +IBM Cloud CI (legacy) | [Cloud Foundry](https://github.com/iamgollum/cypress-example-kitchensink/tree/281-ibm-cloud-pipeline) |
| 90 | +GitLab CI (legacy) | [Example caching when installing using Yarn](https://gitlab.com/bahmutov/cypress-yarn-gitlab-ci-example) |
| 91 | +CodeFresh (legacy) | [bahmutov/cypress-codefresh-example](https://github.com/bahmutov/cypress-codefresh-example) |
| 92 | + |
| 93 | +## Help + Testing |
| 94 | + |
| 95 | +**If you get stuck, here is more help:** |
| 96 | + |
| 97 | +* [Discord Chat](https://on.cypress.io/discord) to connect to our community |
| 98 | +* [Cypress Docs](https://on.cypress.io) |
| 99 | + |
| 100 | +### 1. Fork this repo |
| 101 | + |
| 102 | +If you want to experiment with running this project in Continuous Integration, you'll need to [fork](https://github.com/cypress-io/cypress-example-kitchensink#fork-destination-box) it first. |
| 103 | + |
| 104 | +After forking this project in `Github`, run these commands: |
| 105 | + |
| 106 | +```bash |
| 107 | +## clone this repo to a local directory |
| 108 | +git clone https://github.com/<your-username>/cypress-example-kitchensink.git |
| 109 | + |
| 110 | +## cd into the cloned repo |
| 111 | +cd cypress-example-kitchensink |
| 112 | + |
| 113 | +## install the node_modules |
| 114 | +npm install |
| 115 | + |
| 116 | +## start the local webserver |
| 117 | +npm start |
| 118 | +``` |
| 119 | + |
| 120 | +The `npm start` script will spawn a webserver on port `8080` which hosts the Kitchen Sink App. |
| 121 | + |
| 122 | +You can verify this by opening your browser and navigating to: [`http://localhost:8080`](http://localhost:8080) |
| 123 | + |
| 124 | +You should see the Kitchen Sink App up and running. We are now ready to run Cypress tests. |
| 125 | + |
| 126 | +```bash |
| 127 | +# launch the cypress test runner |
| 128 | +npm run cy:open |
| 129 | +``` |
| 130 | + |
| 131 | +**shortcut:** you can use command `npm run local:open` that uses [start-server-and-test](https://github.com/bahmutov/start-server-and-test) to start local server and open Cypress. When you close Cypress, the local server is stopped automatically. Similarly you can use `npm run local:run` to start the server, run Cypress tests headlessly and close the server. |
| 132 | + |
| 133 | +### 2. Install & write tests in Cypress |
| 134 | + |
| 135 | +[Follow these instructions to install and write tests in Cypress.](https://on.cypress.io/installing-cypress) |
| 136 | + |
| 137 | +## Contributing |
| 138 | + |
| 139 | +Check out the [Contributing Guideline](/CONTRIBUTING.md). |
| 140 | + |
| 141 | +## Changelog |
| 142 | + |
| 143 | +- after v1.0.4 at [cypress-example-kitchensink/releases](https://github.com/cypress-io/cypress-example-kitchensink/releases) |
| 144 | +- before at [CHANGELOG_OLD.md](CHANGELOG_OLD.md) |
0 commit comments