{"id":22400122,"url":"https://github.com/currents-dev/circleci-example","last_synced_at":"2025-03-27T00:17:31.335Z","repository":{"id":42193048,"uuid":"424362164","full_name":"currents-dev/circleci-example","owner":"currents-dev","description":"Using CircleCI with Currents.dev Dashboard","archived":false,"fork":false,"pushed_at":"2023-11-17T22:20:56.000Z","size":94,"stargazers_count":0,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T04:52:20.872Z","etag":null,"topics":["circleci","currents","cypress"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/currents-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-11-03T19:57:19.000Z","updated_at":"2022-01-10T07:40:51.000Z","dependencies_parsed_at":"2023-11-17T20:48:45.721Z","dependency_job_id":null,"html_url":"https://github.com/currents-dev/circleci-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/currents-dev%2Fcircleci-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/currents-dev%2Fcircleci-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/currents-dev%2Fcircleci-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/currents-dev%2Fcircleci-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/currents-dev","download_url":"https://codeload.github.com/currents-dev/circleci-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245755683,"owners_count":20667027,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["circleci","currents","cypress"],"created_at":"2024-12-05T08:11:27.701Z","updated_at":"2025-03-27T00:17:31.317Z","avatar_url":"https://github.com/currents-dev.png","language":"JavaScript","readme":"# Currents.dev - CircleCI Example\n\nThis is an example repository that showcases using [CircleCI](https://circleci.com) with [Currents.dev](https://currents.dev).\n\nWe are hosting independent versions of the Cypress App and [docker images](https://hub.docker.com/r/currentsdev/cypress-included) with pre-installed binaries. Please refer to the [documentation](https://currents.dev/readme/integration-with-cypress/alternative-cypress-binaries) for the list of supported binaries and versions.\n\nThe example [config file](https://github.com/currents-dev/circleci-example/blob/master/.circleci/config.yml) installs the custom Cypress App and runs 3 containers with Cypress tests in parallel using various setup scenarios.\n\n## Prerequisites\n\n- Create an account at https:/app.currents.dev.\n- Obtain **ProjectId** and **Record Key**.\n- Set `CURRENTS_RECORD_KEY`:\n  - create [CircleCI context](https://circleci.com/docs/contexts/) and set `CURRENTS_RECORD_KEY`.\n  - alternatively, set [Environment variable](https://circleci.com/docs/2.0/env-vars/) `CURRENTS_RECORD_KEY`\n- Follow the setup instructions at https://currents.dev/readme/integration-with-cypress/cypress-cloud to create `currents.config.js` set your `projectId`\n\n## Bare CircleCI configuration\n\nPlease refer to the setup scenario that fits your needs.\n\n### Use Docker image with pre-installed Cypress\n\nCircleCI configuration that uses Docker image with pre-installed cypress app.\nRefer to the [documentation](https://currents.dev/readme/integration-with-cypress/alternative-cypress-binaries) for the list of supported binaries and versions.\n\n```yml\nversion: 2.1\n\njobs:\n  # Use pre-built image with alternative Cypress binary\n  noorbs currents-image:\n    parallelism: 3\n    docker:\n      - image: currentsdev/cypress-included:12.17.4\n    steps:\n      - checkout\n      - run:\n          name: Install Dependencies\n          command: npm ci\n      - run:\n          name: Run tests\n          command: npx cypress-cloud run --parallel --record --key $CURRENTS_RECORD_KEY\n\nworkflows:\n  noorbs:\n    jobs:\n      - noorbs currents-image:\n          context: currents\n```\n\n### Explicitly downloading alternative Cypress binary\n\nCircleCI configuration that explicitly downloads alternative Cypress binary.\nRefer to the [documentation](https://currents.dev/readme/integration-with-cypress/alternative-cypress-binaries) for the list of supported binaries and versions.\n\n```yml\nversion: 2.1\n\njobs:\n  # Explicitly download Cypress binary\n  noorbs explicit-download:\n    parallelism: 3\n    docker:\n      - image: cypress/base:18.16.1\n    steps:\n      - checkout\n      - run:\n          name: Install dependencies\n          command: npm ci\n      - run:\n          name: Download Alternative Cypress Binaries\n          command: CYPRESS_DOWNLOAD_MIRROR=https://cy-cdn.currents.dev npx cypress install --force\n      - run:\n          name: Run tests\n          command: npx cypress-cloud run --parallel --record --key $CURRENTS_RECORD_KEY\n\nworkflows:\n  noorbs:\n    jobs:\n      - noorbs explicit-download:\n          context: currents\n```\n\n## Using Cypress Orb with default executor\n\n[Cypress Orb](https://circleci.com/developer/orbs/orb/cypress-io/cypress) has pre-defined commands that facilitate creating CircleCI configuration. The examples below show how to integrate Cypress tests with Currents using Cypress Orb and various setup scenarios.\n\nThe examples below use [Custom Test Command](https://github.com/currents-dev/circleci-example/blob/master/.circleci/config.yml#L9) to run `cypress-cloud` for recording test results and parallelization with [Currents.dev](https://currents.dev)\n\n### Using `cypress/default` executor example\n\nThe configuration below uses the default `cypress/default` [CircleCI executor](https://circleci.com/docs/executor-intro/) and installs custom Cypress binary during `cypress/install` step:\n\n```yml\nversion: 2.1\n\norbs:\n  cypress: cypress-io/cypress@3\n\njobs:\n  # Use cypress/default executor example\n  default-executor cypress-install:\n    executor: cypress/default\n    steps:\n      - cypress/install:\n          post-install: CYPRESS_DOWNLOAD_MIRROR=https://cy-cdn.currents.dev npx cypress install --force\n      - persist_to_workspace:\n          root: ~/\n          paths:\n            - .cache/Cypress\n            - project\n\n  default-executor cypress-run:\n    executor: cypress/default\n    parallelism: 3\n    steps:\n      - attach_workspace:\n          at: ~/\n      - cypress/run-tests:\n          cypress-command: npx cypress-cloud run --parallel --record --key $CURRENTS_RECORD_KEY\n\nworkflows:\n  with-orbs default-executor:\n    jobs:\n      - default-executor cypress-install\n      - default-executor cypress-run:\n          context: currents\n          requires:\n            - default-executor cypress-install\n```\n\n### Using custom executor with pre-installed Cypress App\n\nThe configuration below uses the [custom executor](https://circleci.com/docs/executor-intro/) with pre-installed Cypress App.\n\n```yml\nversion: 2.1\n\norbs:\n  cypress: cypress-io/cypress@3\n\nexecutors:\n  # define custom executors\n  currents-executor:\n    docker:\n      - image: currentsdev/cypress-included:12.17.4\n\njobs:\n  # Use currentsdev executor with pre-installed Cypress binary\n  custom-executor cypress-install:\n    executor: currents-executor\n    steps:\n      - cypress/install\n      - persist_to_workspace:\n          root: ~/\n          paths:\n            - project\n\n  custom-executor cypress-run:\n    executor: currents-executor\n    parallelism: 3\n    steps:\n      - attach_workspace:\n          at: ~/\n      - cypress/run-tests:\n          cypress-command: npx cypress-cloud run --parallel --record --key $CURRENTS_RECORD_KEY\n\nworkflows:\n  with-orbs custom-executor:\n    jobs:\n      - custom-executor cypress-run:\n          context: currents\n```\n\n---\n\nHere's an example of the demo run in Currents.dev dashboard, note that 3 cypress agents were used as part of this run:\n\nhttps://user-images.githubusercontent.com/1637928/227703488-9bec973c-de2d-41d0-b811-dfffd370dfb7.mp4\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcurrents-dev%2Fcircleci-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcurrents-dev%2Fcircleci-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcurrents-dev%2Fcircleci-example/lists"}