Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

🐍 Action: Setup Environment

High-speed, multi-runtime preparation for Python and Node.js environments featuring intelligent dependency caching and custom installation logic.


Important

The Setup Environment action reduces pipeline initialization overhead by up to 60%. It seamlessly prepares multiple runtimes in parallel while managing deep cache trees for pip, npm, poetry, and pnpm.

🚀 Key Impact

  • 📦 Multi-Runtime Preparation: Configures Python and Node.js runtimes in a single, surgical step.
  • ⚡ Intelligent Caching: Automatically manages pip and npm caches to reduce build times by up to 60%.
  • 🛠️ Custom Installation: Override default install commands to support complex dependency trees (Poetry, Yarn, pnpm).
  • 🛡️ Environment Stability: Ensures a consistent, clean environment for reliable test execution across all runners.

🛠️ Configuration

Input Required Default Description
python-version No - Python version to install (e.g., 3.11).
node-version No - Node.js version to install (e.g., 20).
python-install-command No (Table) Command to install Python dependencies.
node-install-command No (Table) Command to install Node.js dependencies.
python-cache No pip Cache strategy for Python: pip, poetry, etc.
node-cache No npm Cache strategy for Node: npm, yarn, pnpm.

⚡ Quick Start

Drop this snippet into your workflow:

steps:
  - name: 🐍 Prepare Environment
    uses: carlos-camara/qa-hub-actions/setup-environment@main
    with:
      python-version: "3.11"
      node-version: "20"
      python-cache: "pip"