Back to Cypress

Continuous Integration

guides/continuous-integration.md

15.13.13.7 KB
Original Source

Continuous Integration

This guide provides an overview of the CI/CD pipelines used in the Cypress repository.

CircleCI

CircleCI is our primary CI system, handling testing, building, and release workflows.

Workflows

Pull Request Workflow

Runs on PRs targeting develop or release/* branches (excluding draft PRs).

StageWhat It Does
BuildInstalls dependencies, builds packages, generates V8 snapshots
Lint & Type CheckESLint, TypeScript compilation, type linting
Unit TestsRuns unit tests across packages
Integration TestsDriver tests (Chrome, Firefox, Electron, WebKit), server tests, component tests
System TestsEnd-to-end system tests across browsers
NPM Package TestsValidates framework integrations (React, Vue, Angular, etc.)

Note: External contributor PRs require manual approval before running tests that use secrets.

Full Workflow

Runs on pushes to develop and release/* branches. Includes everything from the PR workflow plus:

StageWhat It Does
Multi-Platform BuildsLinux x64, Linux ARM64, macOS Intel, macOS Apple Silicon, Windows
Binary CreationTriggers the cypress-publish-binary pipeline to build Electron binaries
Binary VerificationTests the built binary against kitchensink, recipes, and real-world apps
Release PreparationValidates release readiness, prepares npm packages

Triggers

TriggerWorkflowNotes
PR opened/updatedPull RequestSkipped for draft PRs
Push to developFullRuns complete test suite + binary builds
Push to release/*FullSame as develop
Manual (CircleCI UI)ConfigurableCan run full workflow on any branch

Key Jobs

  • build - Core build job that all test jobs depend on
  • ready-to-release - Gate job that ensures all tests pass before release
  • npm-release - Publishes packages to npm (develop/release branches only)
  • create-and-trigger-packaging-artifacts - Initiates binary build process

GitHub Actions

GitHub Actions handle automation, security scanning, and repository maintenance.

Automation

WorkflowTriggerPurpose
Update Browser VersionsDaily at 8am UTCChecks for new Chrome stable/beta versions and creates PRs to update CI config
Update V8 Snapshot CacheDaily + release branch pushesRegenerates V8 snapshots to maintain startup performance

Security

WorkflowTriggerPurpose
Snyk SCA ScanPRs to develop/releaseScans dependencies for known vulnerabilities
Snyk Static AnalysisPRs to develop/releasePerforms code security analysis

PR Validation

WorkflowTriggerPurpose
Semantic Pull RequestPR opened/editedValidates PR title follows conventional commit format and has changelog entry

Repository Maintenance

WorkflowTriggerPurpose
Stale Issues/PRsDaily at 1:30am UTCMarks inactive issues/PRs as stale after 180 days, closes after 14 more days
Triage WorkflowsIssue/PR openedAdds external contributor items to the triage project board

Compliance

WorkflowTriggerPurpose
Upload Release AssetRelease publishedGenerates Software Bill of Materials (SBOM) and attaches to GitHub release

Configuration Files

  • CircleCI: .circleci/config.yml (entry point), .circleci/src/ (source configs)
  • GitHub Actions: .github/workflows/

For information about modifying the CircleCI configuration, see .circleci/README.md.