Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Principle:Cypress io Cypress CI Binary Installation

From Leeroopedia
Knowledge Sources
Domains CI_CD, Package_Management
Last Updated 2026-02-12 00:00 GMT

Overview

A CI-optimized binary installation strategy that leverages filesystem caching to avoid redundant downloads across pipeline runs.

Description

In CI environments, the Cypress binary must be installed on every pipeline run. Without caching, this adds significant time as the ~300MB binary is downloaded from the CDN. CI binary installation extends the standard installation with cache-aware strategies: configuring CYPRESS_CACHE_FOLDER to a persistent CI cache directory, verifying cached binaries with state.getBinaryPkgAsync(), and supporting force-reinstall for cache invalidation.

The install.start function handles CI-specific scenarios: custom cache paths, version pinning via CYPRESS_INSTALL_BINARY, and integrity verification after cache restoration.

Usage

Use this principle when configuring Cypress in CI pipelines (CircleCI, GitHub Actions, GitLab CI, etc.) to optimize installation time through binary caching.

Theoretical Basis

CI Installation Flow:
1. Restore cache: ~/.cache/Cypress/ (or CYPRESS_CACHE_FOLDER)
2. npm install cypress (installs CLI package)
3. postinstall → install.start()
   a. Check if binary at correct version exists in cache
   b. If cached and valid → skip download (fast path)
   c. If not cached → download from CDN
4. Save cache for next pipeline run

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment