From 8f2808864b8730ca5001d1e7a1b8a7e3d75b7fc7 Mon Sep 17 00:00:00 2001 From: Alexander Lakhin Date: Wed, 14 May 2025 11:31:43 +0300 Subject: [PATCH] Allow for running multiple selected tests --- .github/actions/run-python-test-set/action.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/actions/run-python-test-set/action.yml b/.github/actions/run-python-test-set/action.yml index 6f2b48444a..76be059e77 100644 --- a/.github/actions/run-python-test-set/action.yml +++ b/.github/actions/run-python-test-set/action.yml @@ -12,6 +12,10 @@ inputs: description: 'Arbitrary parameters to pytest. For example "-s" to prevent capturing stdout/stderr' required: false default: '' + extended_testing: + description: 'Set to true if the test results should be stored and processed separately' + required: false + default: 'false' needs_postgres_source: description: 'Set to true if the test suite requires postgres source checked out' required: false @@ -135,13 +139,15 @@ runs: PERF_REPORT_DIR="$(realpath test_runner/perf-report-local)" echo "PERF_REPORT_DIR=${PERF_REPORT_DIR}" >> ${GITHUB_ENV} rm -rf $PERF_REPORT_DIR - - TEST_SELECTION="test_runner/${{ inputs.test_selection }}" - EXTRA_PARAMS="${{ inputs.extra_params }}" + TEST_SELECTION="${{ inputs.test_selection }}" if [ -z "$TEST_SELECTION" ]; then echo "test_selection must be set" exit 1 fi + if [[ $TEST_SELECTION != test_runner/* ]]; then + TEST_SELECTION="test_runner/$TEST_SELECTION" + fi + EXTRA_PARAMS="${{ inputs.extra_params }}" if [[ "${{ inputs.run_in_parallel }}" == "true" ]]; then # -n sets the number of parallel processes that pytest-xdist will run EXTRA_PARAMS="-n12 $EXTRA_PARAMS" @@ -244,3 +250,5 @@ runs: report-dir: /tmp/test_output/allure/results unique-key: ${{ inputs.build_type }}-${{ inputs.pg_version }}-${{ runner.arch }} aws-oidc-role-arn: ${{ inputs.aws-oidc-role-arn }} + env: + REPORT_EXT: ${{ inputs.extended_testing == 'true' && '-ext' || '' }}