From ef1d130b51aa9e2622eef0ff665c4577f81385ec Mon Sep 17 00:00:00 2001 From: "Real Novo, Luis" Date: Tue, 14 Jan 2025 08:46:21 -0800 Subject: [PATCH] Parametrize test file used by test runner Signed-off-by: Real Novo, Luis --- test-runner/README.md | 5 +++++ test-runner/action.yml | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/test-runner/README.md b/test-runner/README.md index 7a526fc0..3735fe16 100644 --- a/test-runner/README.md +++ b/test-runner/README.md @@ -264,6 +264,11 @@ Inputs for the action: description: 'Path to Test Dir' required: true type: string + test_file: + description: 'Name of the test file to use' + required: false + type: string + default: 'tests.yaml' token: required: true type: string diff --git a/test-runner/action.yml b/test-runner/action.yml index 6dd02980..587f9e85 100644 --- a/test-runner/action.yml +++ b/test-runner/action.yml @@ -36,6 +36,11 @@ inputs: description: 'Path to Test Dir' required: true type: string + test_file: + description: 'Name of the test file to use' + required: false + type: string + default: 'tests.yaml' token: required: true type: string @@ -56,7 +61,7 @@ runs: python -m pip install -r mlops/test-runner/requirements.txt - name: Test shell: bash - run: venv/bin/python mlops/test-runner/test_runner.py -f ${{ inputs.test_dir }}/tests.yaml -l ${{ inputs.test_dir }}/logs -a ${{ inputs.recipe_dir }}/.actions.json -v + run: venv/bin/python mlops/test-runner/test_runner.py -f ${{ inputs.test_dir }}/${{ inputs.test_file }} -l ${{ inputs.test_dir }}/logs -a ${{ inputs.recipe_dir }}/.actions.json -v env: CACHE_REGISTRY: ${{ inputs.cache_registry }} PYTHONPATH: mlops/test-runner