Git Product home page Git Product logo

Comments (10)

KSXGitHub avatar KSXGitHub commented on May 26, 2024 1

@privatenumber It's just to keep cache size to a minimum.

from action-setup.

KSXGitHub avatar KSXGitHub commented on May 26, 2024

Use actions/cache for that.

from action-setup.

hildjj avatar hildjj commented on May 26, 2024

Maybe add an example to the docs then? This is what I came up with:

      - name: Cache pnpm modules
        uses: actions/cache@v2
        env:
          cache-name: cache-pnpm-modules
        with:
          # pnpm cache files are stored in `~/.pnpm-store` on Linux/macOS
          path: ~/.pnpm-store
          key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}
          restore-keys: |
            {{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}

and

      - name: clean pnpm store
        run: store prune 

at the end

from action-setup.

KSXGitHub avatar KSXGitHub commented on May 26, 2024

You don't need to run pnpm prune directly since post-action of pnpm/action-setup does it for you. Otherwise, it is a good pull request.

from action-setup.

hildjj avatar hildjj commented on May 26, 2024

will send PR, and thanks for the info on the prune.

from action-setup.

privatenumber avatar privatenumber commented on May 26, 2024

What's the benefit of running pnpm store prune at the end? Is it just to keep the cache size to a minimum? Or is it somehow necessary for expected behavior?

from action-setup.

nelson6e65 avatar nelson6e65 commented on May 26, 2024

Cache's path needs to be set to action's dest input, or is always ~/.pnpm-store?

Can I use dest output like the following example?

      - uses: pnpm/[email protected]
        id: pnpm-install
        with:
          version: 7
          run_install: false
          
      - uses: actions/cache@v3
        name: Packages cache
        with:
          path: ${{ steps.pnpm-install.outputs.dest }}
          key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
          restore-keys: |
            ${{ runner.os }}-pnpm-

In readme states: "Where to store pnpm files" is this that should be cached or includes pnpm internal files?

EDIT: This does not work as expected, since dest output is not the pnpm store directory. Solucion provided in #41

from action-setup.

nelson6e65 avatar nelson6e65 commented on May 26, 2024

There are other directories documented at https://pnpm.io/npmrc#store-dir. Is that directory the intended to be set in the path input?

from action-setup.

zkochan avatar zkochan commented on May 26, 2024

no, store-dir should not be in PATH

from action-setup.

nelson6e65 avatar nelson6e65 commented on May 26, 2024

no, store-dir should not be in PATH

I meant, the path input of this action. 😅

from action-setup.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.