Comments (4)
I'm also curious about this. When run manually, we can also cache node_modules
which leads to faster results, but regarding the pnpm
store both solutions might be equal.
See my comparison of the two runs (one caching node_modules
and the other not) here: #76 (comment)
from action-setup.
https://pnpm.io/continuous-integration#github-actions uses the cache: 'pnpm'
version. imho the readme of this package and the website should use identical examples.
from action-setup.
Is there any reason the action couldn't automatically set up node and caching for users? It would be great if we could do something like:
on: [push]
jobs:
test:
steps:
- uses: pnpm/action-setup@vnext
with:
do-for-me: node,cache,install
- run: pnpm-test
People who wanted fine-grained control could just opt out of do-for-me
and run separate uses: actions/setup-node
, uses: actions/cache
and run: pnpm install
themselves. But getting started and being confident you're doing things a recommended/supported way would become very easy.
I think the equivalent of the above right now is something like this according to this repo's docs:
on: [push]
jobs:
cache-and-install:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 7
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- run: pnpm test
from action-setup.
@mmkal I believe that would be covered under #80
from action-setup.
Related Issues (20)
- Build script fails with "Cannot augment module '_' with value exports because it resolves to a non-module entity."
- Duplicate message in error: in the package.json with the key "packageManager" HOT 1
- How does this compare to `run: corepack enable`? HOT 10
- `dest` not working HOT 1
- Could not read from remote repository due to renamed organization
- ENOENT: no such file or directory during self-install HOT 6
- Using pnpm/action-setup in a subdirectory of a git repoository is giving: ENOENT: no such file or directory HOT 10
- Parse package.json from subfolder HOT 1
- [feature request] Use version of pnpm specified in package.json's engines section HOT 1
- Make `version` optional HOT 2
- The version of pnpm is not being retrieved from the packageManager field in the package.json. HOT 6
- How to cache pnpm ? HOT 1
- README references old versions of pnpm
- Installing pnpm when the package.json isn't in the root directory HOT 3
- Enable Code Scanning & Address Code Quality Issues HOT 4
- `v2` not up to date HOT 6
- Invalid
- EACCES: permission denied when running in a container w/ non-default user
- node20 support HOT 18
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from action-setup.