pnpm / pnpm/action-setup

Current GH action caching boilerplate is too complex and out of sync with the official actions/setup-node

Open
#68 3 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.3k
Forks
217
Avg merge
8h 42m
Merged PRs (30d)
1

Description

First off, love pnpm ❤️

I've been gradually replacing yarn v1 with pnpm in all of my OSS repos, and adding pnpm to GitHub actions is currently kind of ugly / verbose / error-prone.

The official actions/setup-node guide also recommends a completely different, simpler approach which doesn't seem to work. See the Caching pnpm (v6.10+) dependencies in their guide, which uses the much simpler cache: 'pnpm' parameter. Since this is how caching works for npm and yarn, I fully expected pnpm caching to "just work" using the official actions/setup-node guide, but it doesn't appear to.

Here's an example of the boilerplate that I'm currently using which matches the caching setup recommended by this repo's readme. As far as I can tell, the caching is taking effect, BUT it seems brittle to have this logic spread across N repositories instead of in pnpm/action-setup and/or the official GitHub actions/setup-node.

For maintainers with lots of repos like myself, this is an annoyance that I know will cause a maintenance burden down the line.

So I'm opening this issue to get feedback and track a better solution going forwards.

Thanks!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked .github/workflows/test.yml example and the actions/setup-node caching guide, especially the pnpm section. Compare the existing boilerplate with the simpler cache configuration and determine the project changes needed for that approach to work reliably; done means the caching setup is simpler and no longer requires repeated repository-specific logic.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, nodejs, typescript
Domain
ci-cd
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.