A GitHub Action that installs npm dependencies with automatic caching and zero configuration.
npm-install is a GitHub Action that automates the installation of npm or Yarn dependencies in CI/CD pipelines with built-in caching. It solves the problem of slow build times by caching dependency folders and requires no configuration for basic use cases. The action supports lock files, subfolders, custom install commands, and rolling cache strategies.
JavaScript developers and teams using GitHub Actions for CI/CD who want to optimize dependency installation and reduce build times without manual cache setup.
Developers choose npm-install because it eliminates the complexity of configuring GitHub Actions cache for dependencies, works seamlessly with both npm and Yarn, and offers advanced features like rolling caches and subfolder support for monorepos.
GitHub Action for install npm dependencies with caching without any configuration
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Works out of the box for most projects; the README states it covers 95% of use cases with a basic example, eliminating manual cache configuration.
Caches dependencies based on lock file hashes (e.g., package-lock.json or yarn.lock), ensuring efficient cache hits only when dependencies are unchanged, as detailed in the caching strategy.
Supports installing dependencies in multiple subdirectories with the working-directory parameter, demonstrated in examples for monorepos with separate package.json files.
Allows overriding the default install command with custom scripts, such as 'yarn --frozen-lockfile --silent', enabling tailored workflows without losing cache benefits.
Only works with npm and Yarn, ignoring modern alternatives like pnpm or Bun, which limits its utility in diverse JavaScript environments.
The rolling cache feature expires monthly to prevent snowballing, but this can lead to inconsistent cache hits and requires careful management for large projects, as admitted in the README's cache snowballing section.
Tightly coupled to GitHub Actions, making it non-portable and unsuitable for teams using or considering other CI/CD platforms like GitLab CI or CircleCI.