Add input to run isolated tests

This commit is contained in:
Bassem Dghaidi
2026-03-16 06:50:25 -07:00
committed by GitHub
parent 6211ca9cbd
commit ed4fdc98c4
+11 -1
View File
@@ -30,6 +30,11 @@ on:
required: false
default: 'latest'
description: 'npm dist-tag for the release. Use "latest" for main branch releases. For non-main branches, use the package major version (e.g. "v5") to avoid overwriting the latest tag.'
test-all:
type: boolean
required: false
default: false
description: 'Run tests for all packages instead of only the package being published'
jobs:
test:
@@ -59,7 +64,12 @@ jobs:
run: npm run build
- name: test
run: npm run test
run: |
if [ "${{ inputs.test-all }}" = "true" ]; then
npm run test
else
npm run test -- --testPathPattern="packages/${{ inputs.package }}"
fi
- name: pack
run: npm pack