pnpm / action-setup

Install pnpm package manager
https://github.com/marketplace/actions/setup-pnpm
MIT License
899 stars 87 forks source link

Does your README.md's cache setup equivalent to actions/setup-node@v3 cache setup #51

Open TriStarGod opened 2 years ago

TriStarGod commented 2 years ago

I see two cache setups (one here and the other on setup-node) and I'm unsure which one is the latest or if either made a difference.

riderx commented 1 year ago

same, none seems to works

janosh commented 1 year ago

I also noticed that cache: pnpm doesn't work.

- name: Set up node
  uses: actions/setup-node@v3
  with:
    cache: pnpm

Looks like this was reported: https://github.com/actions/setup-node/issues/479

melMass commented 1 year ago

The sample from the readme works, there is just a small issue on windows, see #61 or #62 :

- name: Get pnpm store directory
  id: pnpm-cache
    shell: bash
    run: |
      echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
  name: Setup pnpm cache
  with:
    path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
    key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
    restore-keys: |
      ${{ runner.os }}-pnpm-store-
riderx commented 1 year ago

what nodejs version ? i'm speaking about 16. i sis try both way but now i'm sticking to this one: https://github.com/actions/setup-node

melMass commented 1 year ago

@riderx Using 16 too, you can check my full sample that just worked here:

https://github.com/mtb-tools/vscode-mono-workspace/actions/runs/3272609632/workflow

mcmxcdev commented 1 year ago

I was wondering the same thing, we have a setup like:

- uses: actions/setup-node@v3
  with:
    node-version-file: "package.json"
    cache: "pnpm"

And I am unsure if caching the installation works properly or not between runs.