mirror of
https://github.com/pnpm/action-setup.git
synced 2026-03-01 07:51:02 +08:00
* chore: add alignment standards for github config - Add .nvmrc file with Node.js 22 - Add PR template for consistent pull requests - Add issue templates for bug reports, feature requests, and tasks - Add standard labels via gh CLI (type, priority, status, area labels) * fix: resolve form-data security vulnerability Add pnpm override to force form-data>=4.0.4 which fixes GHSA-fjxv-7rqg-78g4 (unsafe random function for boundary). * chore: add .claude/settings.local.json to gitignore * feat: Add claude commands * fix: update pnpm version to 10.27.0 (valid release) * fix: update pnpm version from 9 to 10 in all workflows Update all workflow files to use pnpm version 10 to match the packageManager field in package.json (pnpm@10.27.0). This fixes the CI failure caused by version mismatch: - pr-check.yml: version 9 → 10, matrix 9.15.5 → 10.27.0 - build-and-test.yml: version 9 → 10 - security.yml: version 9 → 10 - test.yaml: all version references updated to 10.27.0 * fix: remove packageManager field to allow testing multiple pnpm versions The action tests multiple pnpm versions (9.x and 10.x). Having a packageManager field in package.json causes version mismatch errors when the workflow specifies a different version than packageManager. * fix: use exact pnpm version 10.27.0 in workflows The action validates that the version specified in workflows must match the packageManager field in package.json exactly. Update from version: 10 to version: 10.27.0 to match pnpm@10.27.0. * fix: use local action in ci.yml with explicit version Since packageManager was removed from package.json to allow testing multiple pnpm versions, ci.yml must now specify the version explicitly. Changed from using released @v4.0.0 to using ./ (local action) to test the current code. * fix: rename claude commands to use Windows-compatible filenames Windows doesn't allow colons in filenames. Changed from using colons (agents:action.md) to hyphens (agents-action.md) for cross-platform compatibility.
176 lines
3.6 KiB
YAML
176 lines
3.6 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:
|
|
- 10.27.0
|
|
os:
|
|
- ubuntu-latest
|
|
- macos-latest
|
|
- windows-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Run the action
|
|
uses: ./
|
|
with:
|
|
version: 10.27.0
|
|
|
|
- name: 'Test: which'
|
|
run: which pnpm; which pnpx
|
|
|
|
- name: 'Test: install'
|
|
run: pnpm install
|
|
|
|
test_dest:
|
|
name: Test with dest
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
pnpm:
|
|
- 10.27.0
|
|
os:
|
|
- ubuntu-latest
|
|
- macos-latest
|
|
- windows-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Run the action
|
|
uses: ./
|
|
with:
|
|
version: 10.27.0
|
|
dest: ~/test/pnpm
|
|
|
|
- name: 'Test: which'
|
|
run: which pnpm && which pnpx
|
|
|
|
- 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@v4
|
|
|
|
- name: Run the action
|
|
uses: ./
|
|
with:
|
|
version: 10.27.0
|
|
standalone: ${{ matrix.standalone }}
|
|
|
|
- name: install Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
# Use Node.js 16 - has ARM64 support and works with pnpm standalone tests
|
|
node-version: 16
|
|
|
|
- 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 }})'
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
pnpm:
|
|
- 10.27.0
|
|
os:
|
|
- ubuntu-latest
|
|
- macos-latest
|
|
- windows-latest
|
|
run_install:
|
|
- name: 'null'
|
|
value: 'null'
|
|
- name: 'empty object'
|
|
value: '{}'
|
|
- name: 'recursive'
|
|
value: |
|
|
recursive: true
|
|
- name: 'global'
|
|
value: |
|
|
args:
|
|
- --global
|
|
- --global-dir=./pnpm-global
|
|
- npm
|
|
- yarn
|
|
- name: 'array'
|
|
value: |
|
|
- {}
|
|
- recursive: true
|
|
- args:
|
|
- --global
|
|
- --global-dir=./pnpm-global
|
|
- npm
|
|
- yarn
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Run the action
|
|
uses: ./
|
|
with:
|
|
version: 10.27.0
|
|
run_install: ${{ matrix.run_install.value }}
|
|
|
|
- name: 'Test: which'
|
|
run: which pnpm; which pnpx
|
|
|
|
- name: 'Test: install'
|
|
run: pnpm install
|