Merge pull request #2350 from actions/Link-/fix-tests-in-releases

Scope tests to the package being published
This commit is contained in:
Bassem Dghaidi
2026-03-16 15:01:41 +01:00
committed by GitHub
+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