mirror of
https://github.com/pnpm/action-setup.git
synced 2026-03-16 15:26:23 +08:00
- When standalone=true, bootstrap with @pnpm/exe via npm ci - When standalone=false, bootstrap with pnpm via npm ci - Both use pnpm self-update to reach the target version - Remove --ignore-scripts from npm ci so @pnpm/exe install scripts run - Add standalone test back to CI Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
150 lines
3.0 KiB
YAML
150 lines
3.0 KiB
YAML
name: Test Action
|
|
|
|
on:
|
|
- push
|
|
- pull_request
|
|
- workflow_dispatch
|
|
|
|
jobs:
|
|
test_default_inputs:
|
|
name: Test with default inputs
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
pnpm:
|
|
- 9.15.5
|
|
os:
|
|
- ubuntu-latest
|
|
- macos-latest
|
|
- windows-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
|
|
|
- name: Run the action
|
|
uses: ./
|
|
with:
|
|
version: 9.15.5
|
|
|
|
- name: 'Test: which'
|
|
run: which pnpm; which pnpx
|
|
|
|
- name: 'Test: version'
|
|
run: pnpm --version
|
|
|
|
- name: 'Test: install in a fresh project'
|
|
run: |
|
|
mkdir /tmp/test-project
|
|
cd /tmp/test-project
|
|
pnpm init
|
|
pnpm add is-odd
|
|
shell: bash
|
|
|
|
test_dest:
|
|
name: Test with dest
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
pnpm:
|
|
- 9.15.5
|
|
os:
|
|
- ubuntu-latest
|
|
- macos-latest
|
|
- windows-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
|
|
|
- name: Run the action
|
|
uses: ./
|
|
with:
|
|
version: 9.15.5
|
|
dest: ~/test/pnpm
|
|
|
|
- name: 'Test: which'
|
|
run: which pnpm && which pnpx
|
|
|
|
- name: 'Test: version'
|
|
run: pnpm --version
|
|
|
|
test_standalone:
|
|
name: Test with standalone
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os:
|
|
- ubuntu-latest
|
|
- windows-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
|
|
|
- name: Run the action
|
|
uses: ./
|
|
with:
|
|
version: 9.15.0
|
|
standalone: true
|
|
|
|
- name: 'Test: which'
|
|
run: which pnpm
|
|
|
|
- name: 'Test: version'
|
|
run: pnpm --version
|
|
|
|
- name: 'Test: install in a fresh project'
|
|
run: |
|
|
mkdir /tmp/test-standalone
|
|
cd /tmp/test-standalone
|
|
pnpm init
|
|
pnpm add is-odd
|
|
shell: bash
|
|
|
|
test_run_install:
|
|
name: 'Test with run_install (${{ matrix.run_install.name }}, ${{ matrix.os }})'
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
pnpm:
|
|
- 9.15.5
|
|
os:
|
|
- ubuntu-latest
|
|
- macos-latest
|
|
- windows-latest
|
|
run_install:
|
|
- name: 'null'
|
|
value: 'null'
|
|
- name: 'global'
|
|
value: |
|
|
args:
|
|
- --global
|
|
- --global-dir=./pnpm-global
|
|
- npm
|
|
- yarn
|
|
|
|
steps:
|
|
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
|
|
|
- name: Run the action
|
|
uses: ./
|
|
with:
|
|
version: 9.15.5
|
|
run_install: ${{ matrix.run_install.value }}
|
|
|
|
- name: 'Test: which'
|
|
run: which pnpm; which pnpx
|
|
|
|
- name: 'Test: version'
|
|
run: pnpm --version
|