add additional args to test npm runs
/ publish (push) Successful in 7s

This commit is contained in:
2026-06-05 16:44:27 -04:00
parent 358bf3b06f
commit 395bf58622
2 changed files with 14 additions and 1 deletions
+4 -1
View File
@@ -8,6 +8,9 @@ inputs:
TEST_SCRIPT:
description: "npm script to run (must exist in package.json)"
default: "test"
TEST_ARGS:
description: "Additional arguments to pass after -- to the test script"
default: ""
WORKING_DIRECTORY:
description: "Directory to run commands in"
default: "."
@@ -37,4 +40,4 @@ runs:
- name: Test
shell: sh
working-directory: ${{ inputs.WORKING_DIRECTORY }}
run: npm run ${{ inputs.TEST_SCRIPT }}
run: npm run ${{ inputs.TEST_SCRIPT }}${{ inputs.TEST_ARGS != '' && format(' -- {0}', inputs.TEST_ARGS) || '' }}