diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index 736d623b..eb4544e5 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -1,6 +1,6 @@ version: 2.1 orbs: - cypress: cypress-io/cypress@dev:<> + cypress: fresh8gaming/cypress-orb@dev:<> orb-tools: circleci/orb-tools@11.5 filters: &filters tags: @@ -123,7 +123,7 @@ workflows: - orb-tools/pack: filters: *filters - orb-tools/publish: - orb-name: cypress-io/cypress + orb-name: fresh8gaming/cypress-orb vcs-type: << pipeline.project.type >> pub-type: production enable-pr-comment: false diff --git a/.github/workflows/add-issue-to-triage-board.yml b/.github/workflows/add-issue-to-triage-board.yml index e9e74b93..52701088 100644 --- a/.github/workflows/add-issue-to-triage-board.yml +++ b/.github/workflows/add-issue-to-triage-board.yml @@ -1,4 +1,4 @@ -name: 'Add issue/PR to Triage Board' +name: "Add issue/PR to Triage Board" on: issues: types: @@ -8,5 +8,5 @@ on: - opened jobs: add-to-triage-project-board: - uses: cypress-io/cypress/.github/workflows/triage_add_to_project.yml@develop + uses: fresh8gaming/cypress-orb/.github/workflows/triage_add_to_project.yml@develop secrets: inherit diff --git a/.github/workflows/triage_closed_issue_comment.yml b/.github/workflows/triage_closed_issue_comment.yml index 0061e2fe..ccf455ea 100644 --- a/.github/workflows/triage_closed_issue_comment.yml +++ b/.github/workflows/triage_closed_issue_comment.yml @@ -1,9 +1,9 @@ -name: 'Handle Comment Workflow' +name: "Handle Comment Workflow" on: issue_comment: types: - created jobs: closed-issue-comment: - uses: cypress-io/cypress/.github/workflows/triage_handle_new_comments.yml@develop + uses: fresh8gaming/cypress-orb/.github/workflows/triage_handle_new_comments.yml@develop secrets: inherit diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index df13b44e..c6272109 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -83,21 +83,22 @@ fix: a patch release 1. Merge changes into `master` and validate the CI passes all the necessary steps. 2. Create a Github tag of the last commit which merged to `master` and passed in CI: - ```shell - git checkout master - git pull origin master - git rev-parse HEA - # copy sha of the version bump commit - git tag -s -a vX.Y.Z -m vX.Y.Z - git push origin vX.Y.Z - ``` -3. Verify the `test-deploy` workflow passes in [CircleCi](https://app.circleci.com/pipelines/github/cypress-io/circleci-orb). This is triggered by pushing the tag to origin which handles releasing the orb changes to https://circleci.com/developer/orbs/orb/cypress-io/cypress. + ```shell + git checkout master + git pull origin master + git rev-parse HEA + # copy sha of the version bump commit + git tag -s -a vX.Y.Z -m vX.Y.Z + git push origin vX.Y.Z + ``` +3. Verify the `test-deploy` workflow passes in [CircleCi](https://app.circleci.com/pipelines/github/cypress-io/circleci-orb). This is triggered by pushing the tag to origin which handles releasing the orb changes to https://circleci.com/developer/orbs/orb/fresh8gaming/cypress-orb. 4. Create a new [GitHub release](https://github.com/cypress-io/circleci-orb/releases). - - Choose the tag you created previously. - - Add the version number to the _Release Title_ and click the `Generate release notes` button. - - Check `Set as the latest release` option. - - Click the `Publish release` button. + - Choose the tag you created previously. + - Add the version number to the _Release Title_ and click the `Generate release notes` button. + - Check `Set as the latest release` option. + - Click the `Publish release` button. + +> For an example on how to publish the orb, view the -> For an example on how to publish the orb, view the - [CircleCI Orb-Tools Publishing Documentation](https://circleci.com/docs/creating-orbs/) - [CircleCI Orb-Tools Publishing Params](https://circleci.com/developer/orbs/orb/circleci/orb-tools#jobs-publish) diff --git a/README.md b/README.md index 66d0d94a..587f145d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cypress CircleCI Orb [![CircleCI](https://circleci.com/gh/cypress-io/circleci-orb.svg?style=svg)](https://circleci.com/gh/cypress-io/circleci-orb) [![CircleCI Orb Version](https://badges.circleci.com/orbs/cypress-io/cypress.svg)](https://circleci.com/developer/orbs/orb/cypress-io/cypress) [![renovate-app badge][renovate-badge]][renovate-app] [![GitHub license](https://img.shields.io/github/license/cypress-io/circleci-orb?logo=license)](https://github.com/cypress-io/circleci-orb/blob/master/LICENSE.md) +# Cypress CircleCI Orb [![CircleCI](https://circleci.com/gh/cypress-io/circleci-orb.svg?style=svg)](https://circleci.com/gh/cypress-io/circleci-orb) [![CircleCI Orb Version](https://badges.circleci.com/orbs/fresh8gaming/cypress-orb.svg)](https://circleci.com/developer/orbs/orb/fresh8gaming/cypress-orb) [![renovate-app badge][renovate-badge]][renovate-app] [![GitHub license](https://img.shields.io/github/license/cypress-io/circleci-orb?logo=license)](https://github.com/cypress-io/circleci-orb/blob/master/LICENSE.md) ## About @@ -9,7 +9,8 @@ install, cache and run Cypress with very little effort. 💡 In CircleCI, a **Job** is a collection of steps to carry out an action. A **Command** defines a sequence of steps as a map to be executed in a job. **Executors** define the underlying technology to run a job. Below are all of these options that will allow you to run your Cypress tests with an out-of-the-box or customized configuration. For the Orb Quick Start Guide and usage cases, view the CircleCI -[Cypress orb documentation](https://circleci.com/developer/orbs/orb/cypress-io/cypress). +[Cypress orb documentation](https://circleci.com/developer/orbs/orb/fresh8gaming/cypress-orb). + ## How to enable **Note:** To use CircleCI Orbs in your projects, you need to enable some settings: @@ -33,11 +34,11 @@ A typical project can have: ```yaml version: 2.1 orbs: - # "cypress-io/cypress@3" installs the latest published + # "fresh8gaming/cypress-orb@3" installs the latest published # version "s.x.y" of the orb. We recommend you then use - # the strict explicit version "cypress-io/cypress@3.x.y" + # the strict explicit version "fresh8gaming/cypress-orb@3.x.y" # to lock the version and prevent unexpected CI changes - cypress: cypress-io/cypress@3 + cypress: fresh8gaming/cypress-orb@3 workflows: build: jobs: @@ -50,44 +51,47 @@ brings simplicity and static checks of parameters to your CircleCI configuration. You can find more usage examples at -[our official orb page](https://circleci.com/developer/orbs/orb/cypress-io/cypress). +[our official orb page](https://circleci.com/developer/orbs/orb/fresh8gaming/cypress-orb). #### Arguments -You can pass arguments to the `cypress/run` job to override any default behaviors. See the [full list of arguments](https://circleci.com/developer/orbs/orb/cypress-io/cypress#jobs-run). +You can pass arguments to the `cypress/run` job to override any default behaviors. See the [full list of arguments](https://circleci.com/developer/orbs/orb/fresh8gaming/cypress-orb#jobs-run). + ### Parallelization -A more complex project that needs to install dependencies +A more complex project that needs to install dependencies and run tests across 4 CI machines [in parallel](https://docs.cypress.io/guides/guides/parallelization) may have: ```yaml version: 2.1 orbs: - cypress: cypress-io/cypress@3 + cypress: fresh8gaming/cypress-orb@3 workflows: build: jobs: - cypress/run: # split specs across machines # record results with Cypress Cloud - cypress-command: 'npx cypress run --parallel --record' - start-command: 'npm run start' + cypress-command: "npx cypress run --parallel --record" + start-command: "npm run start" parallelism: 4 # use 4 CircleCI machines to finish quickly ``` + **Note:** recording test results and spec parallelization requires [Cypress Cloud](https://on.cypress.io/dashboard-introduction) account. You should also set your [record key](https://on.cypress.io/projects#Record-key) as `CYPRESS_RECORD_KEY` environment variable in the CircleCI project. ### ⚠️ Usage and Consumption There are 2 key metrics to understand when running a CI job across multiple machines: -- **Consumption time** on CircleCI + +- **Consumption time** on CircleCI - **Actual time** it takes for tests to run **Consumption time** is essentially the amount of CircleCI resources that a job requires to execute. For example, you may have a job that runs on 5 machines and takes 1 minute for all to complete. In this example it would only take 1 minute of **actual time** to execute -all the jobs but would **consume** 5 minutes of CircleCI resources. +all the jobs but would **consume** 5 minutes of CircleCI resources. The Cypress CircleCI Orb was designed to be as simple and fast as possible for the majority of use cases. @@ -98,10 +102,10 @@ more CircleCI resources than are necessary. > **Parallelization Across 5+ Machines** > > To lower your consumption time when running in parallel on more than 5 machines, -> see [this example](https://circleci.com/developer/orbs/orb/cypress-io/cypress#usage-commands). +> see [this example](https://circleci.com/developer/orbs/orb/fresh8gaming/cypress-orb#usage-commands). > > Here we use the `cypress/install` and -> `cypress/run-tests` commands separately to first install dependencies to a workspace and then run tests in parallel. +> `cypress/run-tests` commands separately to first install dependencies to a workspace and then run tests in parallel. ## Commands @@ -113,7 +117,7 @@ Command that installs your application's node modules and Cypress dependencies. #### Arguments -You can pass arguments to the `cypress/install` command to override any default behaviors. See the [full list of arguments](https://circleci.com/developer/orbs/orb/cypress-io/cypress#commands-install). +You can pass arguments to the `cypress/install` command to override any default behaviors. See the [full list of arguments](https://circleci.com/developer/orbs/orb/fresh8gaming/cypress-orb#commands-install). ### _run-tests_ @@ -122,7 +126,7 @@ necessary dependencies). #### Arguments -You can pass arguments to the `cypress/run-tests` command to override any default behaviors. See the [full list of arguments](https://circleci.com/developer/orbs/orb/cypress-io/cypress#commands-run-tests). +You can pass arguments to the `cypress/run-tests` command to override any default behaviors. See the [full list of arguments](https://circleci.com/developer/orbs/orb/fresh8gaming/cypress-orb#commands-run-tests). ## Executors @@ -131,18 +135,18 @@ A single Docker container used to run Cypress tests. This default executor exten ```yaml version: 2.1 orbs: - cypress: cypress-io/cypress@3 + cypress: fresh8gaming/cypress-orb@3 executor: cypress/default jobs: - cypress/run: ``` -You can also use your own executor by passing in your own Docker image. See the full list of Cypress images on [Docker Hub](https://hub.docker.com/r/cypress/browsers/tags), or compose your own image with the [Cypress Docker Factory](https://github.com/cypress-io/cypress-docker-images#cypressfactory). +You can also use your own executor by passing in your own Docker image. See the full list of Cypress images on [Docker Hub](https://hub.docker.com/r/cypress/browsers/tags), or compose your own image with the [Cypress Docker Factory](https://github.com/fresh8gaming/cypress-orb-docker-images#cypressfactory). ```yaml version: 2.1 orbs: - cypress: cypress-io/cypress@3 + cypress: fresh8gaming/cypress-orb@3 executor: docker: image: cypress/browsers:node-16.18.1-chrome-109.0.5414.74-1-ff-109.0-edge-109.0.1518.52-1 # your Docker image here @@ -157,7 +161,7 @@ jobs: ```yaml version: 2.1 orbs: - cypress: cypress-io/cypress@3 + cypress: fresh8gaming/cypress-orb@3 jobs: install: executor: cypress/default @@ -177,8 +181,8 @@ jobs: - attach_workspace: at: ~/ - cypress/run-tests: - cypress-command: 'npx cypress run --parallel --record' - start-command: 'npm run start' + cypress-command: "npx cypress run --parallel --record" + start-command: "npm run start" ``` --- @@ -195,7 +199,7 @@ Cypress orb is _versioned_ so you can be sure that the configuration will _not_ You can find all changes and published orb versions for Cypress orb at [cypress-io/circleci-orb/releases](https://github.com/cypress-io/circleci-orb/releases). -We are using `cypress-io/cypress@3` version in our examples, so you get the latest published orb version 3.x.x. But we recommend locking it down to an exact version to prevent unexpected changes from suddenly breaking your builds. +We are using `fresh8gaming/cypress-orb@3` version in our examples, so you get the latest published orb version 3.x.x. But we recommend locking it down to an exact version to prevent unexpected changes from suddenly breaking your builds. ### License @@ -203,4 +207,4 @@ This project is licensed under the terms of the [MIT license](/LICENSE.md). [renovate-badge]: https://img.shields.io/badge/renovate-app-blue.svg [renovate-app]: https://renovateapp.com/ -[local-cli]: https://circleci.com/docs/2.0/local-cli/ \ No newline at end of file +[local-cli]: https://circleci.com/docs/2.0/local-cli/ diff --git a/src/examples/browser.yml b/src/examples/browser.yml index 554e3da1..4679da56 100644 --- a/src/examples/browser.yml +++ b/src/examples/browser.yml @@ -1,10 +1,10 @@ description: > Run Cypress tests using specified browser. The CircleCI Browser Tools orb at https://circleci.com/developer/orbs/orb/circleci/browser-tools#commands-install-browser-tools - currently supports Chrome & Firefox. See https://circleci.com/developer/orbs/orb/cypress-io/cypress#usage-edge, for Microsoft Edge support. + currently supports Chrome & Firefox. See https://circleci.com/developer/orbs/orb/fresh8gaming/cypress-orb#usage-edge, for Microsoft Edge support. usage: version: 2.1 orbs: - cypress: cypress-io/cypress@3 + cypress: fresh8gaming/cypress-orb@3 workflows: use-my-orb: jobs: diff --git a/src/examples/caching.yml b/src/examples/caching.yml index d14a723c..f4346b3e 100644 --- a/src/examples/caching.yml +++ b/src/examples/caching.yml @@ -3,7 +3,7 @@ description: > usage: version: 2.1 orbs: - cypress: cypress-io/cypress@3 + cypress: fresh8gaming/cypress-orb@3 workflows: use-my-orb: jobs: diff --git a/src/examples/commands.yml b/src/examples/commands.yml index 3f7b29fe..11d7ae4a 100644 --- a/src/examples/commands.yml +++ b/src/examples/commands.yml @@ -3,7 +3,7 @@ description: > usage: version: 2.1 orbs: - cypress: cypress-io/cypress@3 + cypress: fresh8gaming/cypress-orb@3 jobs: install-and-persist: executor: cypress/default diff --git a/src/examples/component.yml b/src/examples/component.yml index 4bec165e..2b127530 100644 --- a/src/examples/component.yml +++ b/src/examples/component.yml @@ -4,7 +4,7 @@ description: > usage: version: 2.1 orbs: - cypress: cypress-io/cypress@3 + cypress: fresh8gaming/cypress-orb@3 workflows: use-my-orb: jobs: diff --git a/src/examples/custom-install.yml b/src/examples/custom-install.yml index 28fecf96..d29273d3 100644 --- a/src/examples/custom-install.yml +++ b/src/examples/custom-install.yml @@ -3,7 +3,7 @@ description: > usage: version: 2.1 orbs: - cypress: cypress-io/cypress@3 + cypress: fresh8gaming/cypress-orb@3 workflows: use-my-orb: jobs: diff --git a/src/examples/edge.yml b/src/examples/edge.yml index 42937354..0d0c8dc0 100644 --- a/src/examples/edge.yml +++ b/src/examples/edge.yml @@ -3,7 +3,7 @@ description: > usage: version: 2.1 orbs: - cypress: cypress-io/cypress@3 + cypress: fresh8gaming/cypress-orb@3 executor: docker: image: cypress/browsers:node-18.14.1-chrome-111.0.5563.146-1-ff-111.0.1-edge-111.0.1661.54-1 diff --git a/src/examples/mono-repo.yml b/src/examples/mono-repo.yml index fe06d45a..a998744d 100644 --- a/src/examples/mono-repo.yml +++ b/src/examples/mono-repo.yml @@ -3,7 +3,7 @@ description: > usage: version: 2.1 orbs: - cypress: cypress-io/cypress@3 + cypress: fresh8gaming/cypress-orb@3 workflows: use-my-orb: jobs: diff --git a/src/examples/node-version.yml b/src/examples/node-version.yml index 9201d311..b50ff4b6 100644 --- a/src/examples/node-version.yml +++ b/src/examples/node-version.yml @@ -3,7 +3,7 @@ description: > usage: version: 2.1 orbs: - cypress: cypress-io/cypress@3 + cypress: fresh8gaming/cypress-orb@3 jobs: run-cypress-in-specified-node-version: executor: diff --git a/src/examples/recording.yml b/src/examples/recording.yml index 8eeed8df..ba6cfebf 100644 --- a/src/examples/recording.yml +++ b/src/examples/recording.yml @@ -4,7 +4,7 @@ description: > usage: version: 2.1 orbs: - cypress: cypress-io/cypress@3 + cypress: fresh8gaming/cypress-orb@3 workflows: use-my-orb: jobs: diff --git a/src/examples/run.yml b/src/examples/run.yml index 9b8d5a87..fb46e4b4 100644 --- a/src/examples/run.yml +++ b/src/examples/run.yml @@ -4,7 +4,7 @@ description: > usage: version: 2.1 orbs: - cypress: cypress-io/cypress@3 + cypress: fresh8gaming/cypress-orb@3 workflows: use-my-orb: jobs: diff --git a/src/examples/wait-on.yml b/src/examples/wait-on.yml index 73f8ef9c..a1956f2b 100644 --- a/src/examples/wait-on.yml +++ b/src/examples/wait-on.yml @@ -3,7 +3,7 @@ description: > usage: version: 2.1 orbs: - cypress: cypress-io/cypress@3 + cypress: fresh8gaming/cypress-orb@3 workflows: use-my-orb: jobs: diff --git a/src/examples/yarn.yml b/src/examples/yarn.yml index 3ce738a4..d2ce25bf 100644 --- a/src/examples/yarn.yml +++ b/src/examples/yarn.yml @@ -4,7 +4,7 @@ description: > usage: version: 2.1 orbs: - cypress: cypress-io/cypress@3 + cypress: fresh8gaming/cypress-orb@3 workflows: use-my-orb: jobs: