From c51801e35b98e99018b814b055f0c0b6a17f16ce Mon Sep 17 00:00:00 2001 From: Helio Machado <0x2b3bfa0+git@googlemail.com> Date: Mon, 6 Feb 2023 07:23:56 +0100 Subject: [PATCH] Add working-directory support --- action.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/action.yml b/action.yml index 3c361af..6290291 100644 --- a/action.yml +++ b/action.yml @@ -22,6 +22,9 @@ inputs: line-count: description: Use line count to estimate test times (boolean) required: false + working-directory: + description: Run inside the specified directory + required: false outputs: test-suite: description: "A subset of tests, based on the the split index and split type" @@ -57,6 +60,10 @@ runs: if [ -n "${{ inputs.exclude-glob }}" ]; then EXCLUDE_GLOB="-exclude-glob='${{ inputs.exclude-glob }}'" fi + + if [ -n "${{ inputs.working.directory }}" ]; then + cd "${{ inputs.working-directory }}" + fi TESTS=$(./split_tests ${SPLIT_BY} -split-index=${{ inputs.split-index }} -split-total=${{ inputs.split-total }} -glob='${{ inputs.glob }}' ${EXCLUDE_GLOB})