Skip to content

Support cache of dependencies in setup-node. #271

Closed
@dmitry-shibanov

Description

@dmitry-shibanov

Context

actions/setup-node is the 2nd most popular action in GitHub Actions. A lot of customers use it in conjunction with actions/cache to speed up dependencies installation.
See more examples on proper usage in actions/cache documentation.

Goals & Anti-Goals

Integration of caching functionality into actions/setup-node action will bring the following benefits for action users:

  • Decrease the entry threshold for using the cache for Node.js dependencies and simplify initial configuration
  • Simplify YAML pipelines because no need additional steps to enable caching
  • More users will use cache for Node.js so more customers will have fast builds!

We will add support for NPM and Yarn dependencies caching.
As the first stage, we won't support custom locations for package-lock.json, yarn.lock files and action will work only when files are located in repository root.

We don't pursue the goal to provide wide customization of caching in scope of actions/setup-node action. The purpose of this integration is covering ~90% of basic use-cases. If user needs flexible customization, we should advice them to use actions/cache directly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions