mirror of
https://github.com/pnpm/action-setup.git
synced 2026-11-03 12:30:58 +00:00
fix: refresh native bootstrap and test shared store reuse (#293)
* fix: refresh native bootstrap and test shared store reuse * fix: initialize shared store paths in a workflow step * test: verify installed versions outside the pinned project
This commit is contained in:
@@ -212,8 +212,8 @@ jobs:
|
|||||||
test ! -d "$PNPM_DEST/node_modules/@pnpm/exe"
|
test ! -d "$PNPM_DEST/node_modules/@pnpm/exe"
|
||||||
which pnpm
|
which pnpm
|
||||||
actual="$(pnpm --version)"
|
actual="$(pnpm --version)"
|
||||||
if [ "${actual}" != "12.3.4" ]; then
|
if [ "${actual}" != "12.17.0" ]; then
|
||||||
echo "Expected 12.3.4, got ${actual}"
|
echo "Expected 12.17.0, got ${actual}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
mkdir /tmp/test-standalone
|
mkdir /tmp/test-standalone
|
||||||
@@ -222,6 +222,68 @@ jobs:
|
|||||||
pnpm add is-odd
|
pnpm add is-odd
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
|
shared_store:
|
||||||
|
name: 'Repeated install with shared store (pnpm ${{ matrix.version }})'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
version: ['12.11.2', '12.16.1']
|
||||||
|
env:
|
||||||
|
REQUIRED: ${{ matrix.version }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: Configure the shared store and project pin
|
||||||
|
run: |
|
||||||
|
config_home="$RUNNER_TEMP/pnpm-config"
|
||||||
|
store_dir="$RUNNER_TEMP/pnpm-store"
|
||||||
|
mkdir -p "$config_home/pnpm"
|
||||||
|
printf 'storeDir: %s\nenableGlobalVirtualStore: true\n' "$store_dir" > "$config_home/pnpm/config.yaml"
|
||||||
|
printf 'XDG_CONFIG_HOME=%s\nPNPM_STORE_DIR=%s\n' "$config_home" "$store_dir" >> "$GITHUB_ENV"
|
||||||
|
printf '{"packageManager":"pnpm@%s"}\n' "$REQUIRED" > package.json
|
||||||
|
|
||||||
|
- id: first
|
||||||
|
name: Install pnpm into a fresh destination
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
dest: ${{ runner.temp }}/setup-pnpm
|
||||||
|
standalone: false
|
||||||
|
|
||||||
|
- name: Verify the first installation and populated store
|
||||||
|
working-directory: ${{ runner.temp }}
|
||||||
|
env:
|
||||||
|
BIN_DEST: ${{ steps.first.outputs.bin_dest }}
|
||||||
|
run: |
|
||||||
|
test "$("$BIN_DEST/pnpm" --version)" = "$REQUIRED"
|
||||||
|
store_path="$("$BIN_DEST/pnpm" store path --silent)"
|
||||||
|
case "$store_path/" in
|
||||||
|
"$PNPM_STORE_DIR/"*) ;;
|
||||||
|
*) echo "Unexpected store path: $store_path"; exit 1 ;;
|
||||||
|
esac
|
||||||
|
test -n "$(find "$PNPM_STORE_DIR" -type f -print -quit)"
|
||||||
|
touch "$PNPM_STORE_DIR/reused-by-second-install"
|
||||||
|
|
||||||
|
- id: second
|
||||||
|
name: Reinstall pnpm with the same destination and store
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
dest: ${{ runner.temp }}/setup-pnpm
|
||||||
|
standalone: false
|
||||||
|
|
||||||
|
- name: Verify the second installation reused the store
|
||||||
|
working-directory: ${{ runner.temp }}
|
||||||
|
env:
|
||||||
|
BIN_DEST: ${{ steps.second.outputs.bin_dest }}
|
||||||
|
run: |
|
||||||
|
test -f "$PNPM_STORE_DIR/reused-by-second-install"
|
||||||
|
test "$("$BIN_DEST/pnpm" --version)" = "$REQUIRED"
|
||||||
|
test "$(pnpm --version)" = "$REQUIRED"
|
||||||
|
|
||||||
standalone_windows_self_update:
|
standalone_windows_self_update:
|
||||||
# Regression guard for the patchPnpmEnv PATH-shadow bug. When
|
# Regression guard for the patchPnpmEnv PATH-shadow bug. When
|
||||||
# standalone: true on Windows AND the requested pnpm differs from the
|
# standalone: true on Windows AND the requested pnpm differs from the
|
||||||
|
|||||||
Vendored
+72
-72
File diff suppressed because one or more lines are too long
@@ -5,13 +5,39 @@
|
|||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"pnpm": "12.3.4"
|
"pnpm": "12.17.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@pnpm/exe.android-arm64": {
|
||||||
|
"version": "12.17.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@pnpm/exe.android-arm64/-/exe.android-arm64-12.17.0.tgz",
|
||||||
|
"integrity": "sha512-gwu/F5YyoJp1bIbrIBl7B8JO3rkjkGlKikwQg9s0aVa5xWaBYIqPX+ZJqQ7I4D1YfbdI/Omfze0+6vnYiWHG6A==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"android"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"node_modules/@pnpm/exe.android-x64": {
|
||||||
|
"version": "12.17.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@pnpm/exe.android-x64/-/exe.android-x64-12.17.0.tgz",
|
||||||
|
"integrity": "sha512-qUNhCvWyeBrUByNWkqqQ3Koy1gIAQ8UV5HDHXxoo5NUWVTde0Ld2BxweNwWJw8CNKpqEGceCUdjZ506JYpTjJg==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"android"
|
||||||
|
]
|
||||||
|
},
|
||||||
"node_modules/@pnpm/exe.darwin-arm64": {
|
"node_modules/@pnpm/exe.darwin-arm64": {
|
||||||
"version": "12.3.4",
|
"version": "12.17.0",
|
||||||
"resolved": "https://registry.npmjs.org/@pnpm/exe.darwin-arm64/-/exe.darwin-arm64-12.3.4.tgz",
|
"resolved": "https://registry.npmjs.org/@pnpm/exe.darwin-arm64/-/exe.darwin-arm64-12.17.0.tgz",
|
||||||
"integrity": "sha512-PAyUol8T1+/+ViOiXAt51ECA+QnfXCqz6foL4bW+LsoX0NcVd5XVEM2mRQu+LV4oc7uRz9zf9U0P+XFfuQeDAw==",
|
"integrity": "sha512-0nkEqRLIbrm7dWl+p2EPpmyNKyM0bbdPEovdtMhHYbhkO+Vls38S+6emkx8kSTAr75BNXYXkCl4RtGinGG4Erg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -22,9 +48,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@pnpm/exe.darwin-x64": {
|
"node_modules/@pnpm/exe.darwin-x64": {
|
||||||
"version": "12.3.4",
|
"version": "12.17.0",
|
||||||
"resolved": "https://registry.npmjs.org/@pnpm/exe.darwin-x64/-/exe.darwin-x64-12.3.4.tgz",
|
"resolved": "https://registry.npmjs.org/@pnpm/exe.darwin-x64/-/exe.darwin-x64-12.17.0.tgz",
|
||||||
"integrity": "sha512-fxP9JCk0Cdye+ePuj+GJJLMUMTqHGWRdb1dtv4How876uQ2ehxvenpgiYAir/ceO9PsYUZkFTtyZdx+rRu5QOA==",
|
"integrity": "sha512-w89cboNi4KCzmt/dSKrE4ijVNKICKiZsE9TcIWf77Tz+VpoDfuhPSmWPZK+iCHBvlI/9dIN+M3HiPPVsFnAx4Q==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -34,10 +60,23 @@
|
|||||||
"darwin"
|
"darwin"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"node_modules/@pnpm/exe.freebsd-x64": {
|
||||||
|
"version": "12.17.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@pnpm/exe.freebsd-x64/-/exe.freebsd-x64-12.17.0.tgz",
|
||||||
|
"integrity": "sha512-DJ0FOaUDXc71icSgiuBFEvqReqoSiS/rmnC6kltoiC3MzPyw3awcGbT/7FnnYzi/ziuoTC7v6vfBh0Vzv7VKOQ==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"freebsd"
|
||||||
|
]
|
||||||
|
},
|
||||||
"node_modules/@pnpm/exe.linux-arm64": {
|
"node_modules/@pnpm/exe.linux-arm64": {
|
||||||
"version": "12.3.4",
|
"version": "12.17.0",
|
||||||
"resolved": "https://registry.npmjs.org/@pnpm/exe.linux-arm64/-/exe.linux-arm64-12.3.4.tgz",
|
"resolved": "https://registry.npmjs.org/@pnpm/exe.linux-arm64/-/exe.linux-arm64-12.17.0.tgz",
|
||||||
"integrity": "sha512-t71AVA7LRqiKTyZ5xMYaZc2n5DfdpMbfokZuiIOXHBOM03ECnF0t4iYwaBDqJgVjlKYUOwaF/bRQajGNA4cJ4w==",
|
"integrity": "sha512-Cj2nIzWTVm6ZuhQHqL9SiJ11scBnEGxJyNg7tYQPzh9fVF5UVRkv+LbyfwdftnAtJerK/7HDpK/55WeQqp8OkA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -51,9 +90,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@pnpm/exe.linux-arm64-musl": {
|
"node_modules/@pnpm/exe.linux-arm64-musl": {
|
||||||
"version": "12.3.4",
|
"version": "12.17.0",
|
||||||
"resolved": "https://registry.npmjs.org/@pnpm/exe.linux-arm64-musl/-/exe.linux-arm64-musl-12.3.4.tgz",
|
"resolved": "https://registry.npmjs.org/@pnpm/exe.linux-arm64-musl/-/exe.linux-arm64-musl-12.17.0.tgz",
|
||||||
"integrity": "sha512-FBOt0/7ye6O6q4AllVV5QMviB6qE6fqkeczV/+MDWQsmo+QJrlfsh6X7CpH/tClVpBZEyIbjpUoT8bNhCYBxEg==",
|
"integrity": "sha512-w5ZwZ4j8S804DGhMYlLLpc+G3Kkc+5GlDO++LLvO/nDIXBTHRhdxPfQBQU08q31k0JYfp3wXCQk0Y7DnsuVF6w==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -66,10 +105,58 @@
|
|||||||
"linux"
|
"linux"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"node_modules/@pnpm/exe.linux-ppc64": {
|
||||||
|
"version": "12.17.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@pnpm/exe.linux-ppc64/-/exe.linux-ppc64-12.17.0.tgz",
|
||||||
|
"integrity": "sha512-Gb//Wm15fXl+qWcxjNQmwlYDjGiJOnLU/A9uRZYmtkyZie2Yx8AHI6XkUIJioQz99TwVDKQ87ywD5Jtk8zcgyg==",
|
||||||
|
"cpu": [
|
||||||
|
"ppc64"
|
||||||
|
],
|
||||||
|
"libc": [
|
||||||
|
"glibc"
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"node_modules/@pnpm/exe.linux-riscv64": {
|
||||||
|
"version": "12.17.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@pnpm/exe.linux-riscv64/-/exe.linux-riscv64-12.17.0.tgz",
|
||||||
|
"integrity": "sha512-+kItEcFjdVZEDzODsc7icb8cB+3AouCrEzOCezzxLITRhw86m9t3J/qyPdcFELBjeMnS+IXV8sJaSCQcpSqfgA==",
|
||||||
|
"cpu": [
|
||||||
|
"riscv64"
|
||||||
|
],
|
||||||
|
"libc": [
|
||||||
|
"glibc"
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"node_modules/@pnpm/exe.linux-s390x": {
|
||||||
|
"version": "12.17.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@pnpm/exe.linux-s390x/-/exe.linux-s390x-12.17.0.tgz",
|
||||||
|
"integrity": "sha512-jf5ghD2uDeknWQgK/EsCFNwlyL7BYLWfXe687g5UMVFclPLt524CREZ8Yl5hf4u7p3evCIPBN/m5I1QXUmJpHw==",
|
||||||
|
"cpu": [
|
||||||
|
"s390x"
|
||||||
|
],
|
||||||
|
"libc": [
|
||||||
|
"glibc"
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
]
|
||||||
|
},
|
||||||
"node_modules/@pnpm/exe.linux-x64": {
|
"node_modules/@pnpm/exe.linux-x64": {
|
||||||
"version": "12.3.4",
|
"version": "12.17.0",
|
||||||
"resolved": "https://registry.npmjs.org/@pnpm/exe.linux-x64/-/exe.linux-x64-12.3.4.tgz",
|
"resolved": "https://registry.npmjs.org/@pnpm/exe.linux-x64/-/exe.linux-x64-12.17.0.tgz",
|
||||||
"integrity": "sha512-2ZqOlSPkfwX1h5cR+FPiWf8+F+2hZT/3TvhUK5sigHqwaQCIiq8R7CGxhndKs63JtcLi2a1Qpo+wX/EoyfjyJQ==",
|
"integrity": "sha512-vQAusDzMofc/Ee4KOUYjE6FWeHOlMGQyvhR7W39QSamVeJWS16co/n+bhjdjwjI3UFh8IWOpamvTS+b4lvQUog==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -83,9 +170,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@pnpm/exe.linux-x64-musl": {
|
"node_modules/@pnpm/exe.linux-x64-musl": {
|
||||||
"version": "12.3.4",
|
"version": "12.17.0",
|
||||||
"resolved": "https://registry.npmjs.org/@pnpm/exe.linux-x64-musl/-/exe.linux-x64-musl-12.3.4.tgz",
|
"resolved": "https://registry.npmjs.org/@pnpm/exe.linux-x64-musl/-/exe.linux-x64-musl-12.17.0.tgz",
|
||||||
"integrity": "sha512-RPmk7Jb/aYaFvL2iyDN/AtMY+hUEsue732WmXpcuQ9tBpMnGyA5py7Z3+e+qmQaJ0zY/4ni9jJiyPBQHujmv6w==",
|
"integrity": "sha512-JGxrGSxkDkqRAUD49T9dOnKyJkQ3bWBeHnYH4o4mvj09R9eUzhWFi8oa6WPNyCO0/7/Max2gsSfgXOHj3QW7ug==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -99,9 +186,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@pnpm/exe.win32-arm64": {
|
"node_modules/@pnpm/exe.win32-arm64": {
|
||||||
"version": "12.3.4",
|
"version": "12.17.0",
|
||||||
"resolved": "https://registry.npmjs.org/@pnpm/exe.win32-arm64/-/exe.win32-arm64-12.3.4.tgz",
|
"resolved": "https://registry.npmjs.org/@pnpm/exe.win32-arm64/-/exe.win32-arm64-12.17.0.tgz",
|
||||||
"integrity": "sha512-ANyrHqyqco6SXBysUTRF74itDyyraea7IbFsKFdNXTjcFnfycTDx37EwuhdpPYFNSIh2JhUG4fByclsRfiHX7w==",
|
"integrity": "sha512-qDQh8rmyK5sxlaCSCADcmPrvytJabMCbxtJ0nCitzRo2j3/8BhzLjlOcWF3C6iPGhR5CbIb+btNy+VCVhd06mQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -112,9 +199,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@pnpm/exe.win32-x64": {
|
"node_modules/@pnpm/exe.win32-x64": {
|
||||||
"version": "12.3.4",
|
"version": "12.17.0",
|
||||||
"resolved": "https://registry.npmjs.org/@pnpm/exe.win32-x64/-/exe.win32-x64-12.3.4.tgz",
|
"resolved": "https://registry.npmjs.org/@pnpm/exe.win32-x64/-/exe.win32-x64-12.17.0.tgz",
|
||||||
"integrity": "sha512-WH/KqBPY/hq2Tb7SgQltEZytimcjgKRaCRL/aM9CI0c67iKc5TVmHUhIiL3Ux9FB4bWn36i6XewUcScQI+zG8w==",
|
"integrity": "sha512-qCo1OQlE3WrFZIAUK0O5EoupLaQ1fST7zNX8Qd+Tc4ojWgCvYA/ze0uP9hox8mSFC/JPAGRSG5o8gUBSq2rRxw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -125,9 +212,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/pnpm": {
|
"node_modules/pnpm": {
|
||||||
"version": "12.3.4",
|
"version": "12.17.0",
|
||||||
"resolved": "https://registry.npmjs.org/pnpm/-/pnpm-12.3.4.tgz",
|
"resolved": "https://registry.npmjs.org/pnpm/-/pnpm-12.17.0.tgz",
|
||||||
"integrity": "sha512-lhqkH7B32joEpEHZ+OFevAyW2o73ELLrZ7+e58sGEOq9SPH9hfUc/+c4RnhfoPh8VqOocqHYk/hEZ0G1zORUVw==",
|
"integrity": "sha512-uNIj6+wEtYContIG2qcdG8y2oe4dUu+pXMOw23UnFWHfjw2OLEOt05xewIAYr3qKlRCOcJD5Win4hye3pA/VPQ==",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"bin": {
|
"bin": {
|
||||||
@@ -137,17 +224,23 @@
|
|||||||
"pnx": "pnx"
|
"pnx": "pnx"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.*"
|
"node": ">=18"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@pnpm/exe.darwin-arm64": "12.3.4",
|
"@pnpm/exe.android-arm64": "12.17.0",
|
||||||
"@pnpm/exe.darwin-x64": "12.3.4",
|
"@pnpm/exe.android-x64": "12.17.0",
|
||||||
"@pnpm/exe.linux-arm64": "12.3.4",
|
"@pnpm/exe.darwin-arm64": "12.17.0",
|
||||||
"@pnpm/exe.linux-arm64-musl": "12.3.4",
|
"@pnpm/exe.darwin-x64": "12.17.0",
|
||||||
"@pnpm/exe.linux-x64": "12.3.4",
|
"@pnpm/exe.freebsd-x64": "12.17.0",
|
||||||
"@pnpm/exe.linux-x64-musl": "12.3.4",
|
"@pnpm/exe.linux-arm64": "12.17.0",
|
||||||
"@pnpm/exe.win32-arm64": "12.3.4",
|
"@pnpm/exe.linux-arm64-musl": "12.17.0",
|
||||||
"@pnpm/exe.win32-x64": "12.3.4"
|
"@pnpm/exe.linux-ppc64": "12.17.0",
|
||||||
|
"@pnpm/exe.linux-riscv64": "12.17.0",
|
||||||
|
"@pnpm/exe.linux-s390x": "12.17.0",
|
||||||
|
"@pnpm/exe.linux-x64": "12.17.0",
|
||||||
|
"@pnpm/exe.linux-x64-musl": "12.17.0",
|
||||||
|
"@pnpm/exe.win32-arm64": "12.17.0",
|
||||||
|
"@pnpm/exe.win32-x64": "12.17.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user