action-setup icon indicating copy to clipboard operation
action-setup copied to clipboard

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

Open TriStarGod opened this issue 2 years ago • 6 comments

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.

TriStarGod avatar Jul 20 '22 21:07 TriStarGod

same, none seems to works

riderx avatar Sep 28 '22 23:09 riderx

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

janosh avatar Oct 17 '22 18:10 janosh

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-

melMass avatar Oct 18 '22 10:10 melMass

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

riderx avatar Oct 18 '22 10:10 riderx

@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

melMass avatar Oct 18 '22 10:10 melMass

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.

mcmxcdev avatar Feb 14 '23 07:02 mcmxcdev