Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Repository files navigation

⚠️ ARCHIVED REPOSITORY ⚠️

This repository is now archived and read-only.

For the latest examples and updates, please visit our new repository:


Currents.dev - CircleCI Example

This is an example repository that showcases using CircleCI with Currents.dev.

We are hosting independent versions of the Cypress App and docker images with pre-installed binaries. Please refer to the documentation for the list of supported binaries and versions.

The example config file installs the custom Cypress App and runs 3 containers with Cypress tests in parallel using various setup scenarios.

Prerequisites

Bare CircleCI configuration

Please refer to the setup scenario that fits your needs.

Use Docker image with pre-installed Cypress

CircleCI configuration that uses Docker image with pre-installed cypress app. Refer to the documentation for the list of supported binaries and versions.

version: 2.1jobs:
# Use pre-built image with alternative Cypress binarynoorbs currents-image:
parallelism: 3docker:
- image: currentsdev/cypress-included:12.17.4steps:
- checkout
- run:
name: Install Dependenciescommand: npm ci
- run:
name: Run testscommand: npx cypress-cloud run --parallel --record --key $CURRENTS_RECORD_KEYworkflows:
noorbs:
jobs:
- noorbs currents-image:
context: currents

Explicitly downloading alternative Cypress binary

CircleCI configuration that explicitly downloads alternative Cypress binary. Refer to the documentation for the list of supported binaries and versions.

version: 2.1jobs:
# Explicitly download Cypress binarynoorbs explicit-download:
parallelism: 3docker:
- image: cypress/base:18.16.1steps:
- checkout
- run:
name: Install dependenciescommand: npm ci
- run:
name: Download Alternative Cypress Binariescommand: CYPRESS_DOWNLOAD_MIRROR=https://cy-cdn.currents.dev npx cypress install --force
- run:
name: Run testscommand: npx cypress-cloud run --parallel --record --key $CURRENTS_RECORD_KEYworkflows:
noorbs:
jobs:
- noorbs explicit-download:
context: currents

Using Cypress Orb with default executor

Cypress Orb 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.

The examples below use Custom Test Command to run cypress-cloud for recording test results and parallelization with Currents.dev

Using cypress/default executor example

The configuration below uses the default cypress/defaultCircleCI executor and installs custom Cypress binary during cypress/install step:

version: 2.1orbs:
cypress: cypress-io/cypress@3jobs:
# Use cypress/default executor exampledefault-executor cypress-install:
executor: cypress/defaultsteps:
- cypress/install:
post-install: CYPRESS_DOWNLOAD_MIRROR=https://cy-cdn.currents.dev npx cypress install --force
- persist_to_workspace:
root: ~/paths:
- .cache/Cypress
- projectdefault-executor cypress-run:
executor: cypress/defaultparallelism: 3steps:
- attach_workspace:
at: ~/
- cypress/run-tests:
cypress-command: npx cypress-cloud run --parallel --record --key $CURRENTS_RECORD_KEYworkflows:
with-orbs default-executor:
jobs:
- default-executor cypress-install
- default-executor cypress-run:
context: currentsrequires:
- default-executor cypress-install

Using custom executor with pre-installed Cypress App

The configuration below uses the custom executor with pre-installed Cypress App.

version: 2.1orbs:
cypress: cypress-io/cypress@3executors:
# define custom executorscurrents-executor:
docker:
- image: currentsdev/cypress-included:12.17.4jobs:
# Use currentsdev executor with pre-installed Cypress binarycustom-executor cypress-install:
executor: currents-executorsteps:
- cypress/install
- persist_to_workspace:
root: ~/paths:
- projectcustom-executor cypress-run:
executor: currents-executorparallelism: 3steps:
- attach_workspace:
at: ~/
- cypress/run-tests:
cypress-command: npx cypress-cloud run --parallel --record --key $CURRENTS_RECORD_KEYworkflows:
with-orbs custom-executor:
jobs:
- custom-executor cypress-run:
context: currents

Here's an example of the demo run in Currents.dev dashboard, note that 3 cypress agents were used as part of this run:

currents-2023-03-25-00.21.20.mp4

About

Using CircleCI with Currents.dev Dashboard

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages