- Link to the repository: https://github.com/currents-dev/circleci-example :contentReference[oaicite:0]{index=0}
- Latest change: Nov 17, 2023 —
chore: use currents images (#11):contentReference[oaicite:1]{index=1} - No bot/Dependabot commits appear on the commit history page for this repo, so Nov 17, 2023 is the latest meaningful change. :contentReference[oaicite:2]{index=2}
An example repo showing how to run Cypress tests on CircleCI and record/parallelize them to Currents.dev using cypress-cloud, including guidance for alternative Cypress binaries (Currents-hosted binaries / prebuilt images). :contentReference[oaicite:3]{index=3}
- Create a Currents account, get ProjectId + Record Key. :contentReference[oaicite:4]{index=4}
- In CircleCI, set
CURRENTS_RECORD_KEYvia a Context (recommended) or env var. :contentReference[oaicite:5]{index=5} - Create
currents.config.jswith yourprojectId(repo has a sample but it’s hardcoded). :contentReference[oaicite:6]{index=6} - Run CircleCI using one of the provided configurations (all run 3 parallel containers) that call:
npx cypress-cloud run --parallel --record --key $CURRENTS_RECORD_KEY:contentReference[oaicite:7]{index=7}
- Choose how Cypress is installed:
- Use Currents prebuilt image
currentsdev/cypress-included:12.17.4:contentReference[oaicite:8]{index=8} - Explicit download via
CYPRESS_DOWNLOAD_MIRROR=https://cy-cdn.currents.dev npx cypress install --force:contentReference[oaicite:9]{index=9} - Cypress Orb (
cypress-io/cypress@3) with either the default executor or a custom executor that uses the Currents image. :contentReference[oaicite:10]{index=10}
- Use Currents prebuilt image
- Bare CircleCI config (no orbs):
- Using the Currents Docker image with preinstalled Cypress (
currentsdev/cypress-included:12.17.4) :contentReference[oaicite:11]{index=11} - Using a base image and explicitly downloading the alternative Cypress binary (download mirror) :contentReference[oaicite:12]{index=12}
- Using the Currents Docker image with preinstalled Cypress (
- Cypress Orb examples:
- Orb install step with
post-installto fetch the alternative Cypress binary, workspace persistence, then a parallel run job :contentReference[oaicite:13]{index=13} - Custom executor (
currents-executor) pointing atcurrentsdev/cypress-included:12.17.4:contentReference[oaicite:14]{index=14}
- Orb install step with
- Dependency baseline:
cypress@12.17.4,cypress-cloud, andtypescriptinpackage.json:contentReference[oaicite:15]{index=15}
- Currents config example:
currents.config.jswithprojectId+batchSize: 3:contentReference[oaicite:16]{index=16}
- Remove hardcoded
projectIdcurrents.config.jscurrently hardcodesprojectId: "Ij0RfK"; switch toprocess.env.CURRENTS_PROJECT_IDand document it (and/or CircleCI Context vars). :contentReference[oaicite:17]{index=17}
- Provide a
.env.example+ “Required variables” table- Explicitly list:
CURRENTS_RECORD_KEY(secret),CURRENTS_PROJECT_ID(non-secret but should still be configurable), and optionalCURRENTS_CI_BUILD_IDpattern (if you want consistent grouping). :contentReference[oaicite:18]{index=18}
- Explicitly list:
- Format the repo files
.circleci/config.yml,package.json, andcurrents.config.jsare effectively one-liners; pretty-print them so users can copy/edit safely. :contentReference[oaicite:19]{index=19}
- Add a quickstart that maps to the 3 scenarios
- “Pick one: (A) prebuilt image, (B) explicit download, (C) Cypress Orb” with copy/paste snippets + where to set secrets in CircleCI. :contentReference[oaicite:20]{index=20}
- Make “alternative binaries” intent obvious
- README mentions Currents-hosted Cypress app/binaries and supported versions; add a short explanation of why you’d choose mirror vs image (speed, reliability, avoiding blocked downloads). :contentReference[oaicite:21]{index=21}