feat: standalone binary (#92)
Some checks are pending
Test Action / Test with default inputs (push) Waiting to run
Test Action / Test with default inputs-1 (push) Waiting to run
Test Action / Test with default inputs-2 (push) Waiting to run
Test Action / Test with dest (push) Waiting to run
Test Action / Test with dest-1 (push) Waiting to run
Test Action / Test with dest-2 (push) Waiting to run
Test Action / Test with standalone (push) Waiting to run
Test Action / Test with standalone-1 (push) Waiting to run
Test Action / Test with standalone-2 (push) Waiting to run
Test Action / Test with standalone-3 (push) Waiting to run
Test Action / Test with standalone-4 (push) Waiting to run
Test Action / Test with standalone-5 (push) Waiting to run
Test Action / Test with run_install (array, macos-latest) (push) Waiting to run
Test Action / Test with run_install (empty object, macos-latest) (push) Waiting to run
Test Action / Test with run_install (global, macos-latest) (push) Waiting to run
Test Action / Test with run_install (null, macos-latest) (push) Waiting to run
Test Action / Test with run_install (recursive, macos-latest) (push) Waiting to run
Test Action / Test with run_install (array, ubuntu-latest) (push) Waiting to run
Test Action / Test with run_install (empty object, ubuntu-latest) (push) Waiting to run
Test Action / Test with run_install (global, ubuntu-latest) (push) Waiting to run
Test Action / Test with run_install (null, ubuntu-latest) (push) Waiting to run
Test Action / Test with run_install (recursive, ubuntu-latest) (push) Waiting to run
Test Action / Test with run_install (array, windows-latest) (push) Waiting to run
Test Action / Test with run_install (empty object, windows-latest) (push) Waiting to run
Test Action / Test with run_install (global, windows-latest) (push) Waiting to run
Test Action / Test with run_install (null, windows-latest) (push) Waiting to run
Test Action / Test with run_install (recursive, windows-latest) (push) Waiting to run

* feat: add an option to install the self-contained binary version of pnpm

* test: add a test about nodejs_bundled

* style: remove an empty line

* chore: use newer pnpm

* chore: update dependencies

* feat: rename `nodejs_bundled` to `standalone`

as @zkochan suggested

* docs: add

---------

Co-authored-by: Takashi Sato <takashi@tks.st>
This commit is contained in:
Khải 2023-07-26 18:50:04 +07:00 committed by GitHub
parent 0b715c7ebb
commit d882d12c64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 285 additions and 191 deletions

View file

@ -35,8 +35,8 @@ jobs:
- name: 'Test: install'
run: pnpm install
test_explicit_inputs:
name: Test with explicit inputs
test_dest:
name: Test with dest
runs-on: ${{ matrix.os }}
@ -65,6 +65,61 @@ jobs:
- name: 'Test: install'
run: pnpm install
test_standalone:
name: Test with standalone
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
standalone:
- true
- false
steps:
- uses: actions/checkout@v3
- name: Run the action
uses: ./
with:
version: 7.0.0
standalone: ${{ matrix.standalone }}
- name: install Node.js
uses: actions/setup-node@v3
with:
# pnpm@7.0.0 is not compatible with Node.js 12
node-version: 12.22.12
- name: 'Test: which (pnpm)'
run: which pnpm
- name: 'Test: which (pnpx)'
if: matrix.standalone == false
run: which pnpx
- name: 'Test: install when standalone is true'
if: matrix.standalone
run: pnpm install
- name: 'Test: install when standalone is false'
if: matrix.standalone == false
# Since the default shell on windows runner is pwsh, we specify bash explicitly
shell: bash
run: |
if pnpm install; then
echo "pnpm install should fail"
exit 1
else
echo "pnpm install failed as expected"
fi
test_run_install:
name: 'Test with run_install (${{ matrix.run_install.name }}, ${{ matrix.os }})'