From 7197e3ff10f0f54e89dc88919d5ecfdc1f2adcad Mon Sep 17 00:00:00 2001 From: Joan Fontanals Martinez Date: Wed, 21 Jun 2023 17:48:39 +0200 Subject: [PATCH] test: run integration tests split Signed-off-by: Joan Fontanals Martinez --- .github/workflows/ci.yml | 4 ++-- scripts/get-all-test-paths.sh | 9 +++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6da850a..865bf06 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,7 +62,7 @@ jobs: echo "::set-output name=matrix::$(bash scripts/get-all-test-paths.sh unit 1)" - id: set-matrix-integration run: | - echo "::set-output name=matrix::$(bash scripts/get-all-test-paths.sh integration_local 1)" + echo "::set-output name=matrix::$(bash scripts/get-all-test-paths.sh integration 1)" outputs: matrix-unit: ${{ steps.set-matrix-unit.outputs.matrix }} matrix-integration: ${{ steps.set-matrix-integration.outputs.matrix }} @@ -133,7 +133,7 @@ jobs: id: test run: | pytest -v -s --force-flaky --min-passes 1 --max-runs 5 ${{ matrix.test-path }} - timeout-minutes: 45 + timeout-minutes: 30 # just for blocking the merge until all parallel integration-tests are successful success-all-test: diff --git a/scripts/get-all-test-paths.sh b/scripts/get-all-test-paths.sh index 5ce9378..e3bbe35 100644 --- a/scripts/get-all-test-paths.sh +++ b/scripts/get-all-test-paths.sh @@ -7,16 +7,13 @@ DEFAULT_BATCH_SIZE=5 BATCH_SIZE="${2:-$DEFAULT_BATCH_SIZE}" declare -a unit_tests=($(find tests/unit -name "test_*.py")) -declare -a integration_tests_local=($(find tests/integration/local -name "test_*.py")) -declare -a integration_tests_jcloud=($(find tests/integration/jcloud -name "test_*.py")) +declare -a integration_tests=($(find tests/integration -name "test_*.py")) declare -a all_tests=("${unit_tests[@]}" "${integration_tests[@]}") if [ "$TEST_SUITE" == "unit" ]; then dest="$(echo "${unit_tests[@]}" | xargs -n$BATCH_SIZE)" -elif [[ "$TEST_SUITE" == "integration_local" ]]; then - dest="$(echo "${integration_tests_local[@]}" | xargs -n$BATCH_SIZE)" -elif [[ "$TEST_SUITE" == "integration_jcloud" ]]; then - dest="$(echo "${integration_tests_jcloud[@]}" | xargs -n$BATCH_SIZE)" +elif [[ "$TEST_SUITE" == "integration" ]]; then + dest="$(echo "${integration_tests[@]}" | xargs -n$BATCH_SIZE)" else dest="$(echo "${all_tests[@]}" | xargs -n$BATCH_SIZE)" fi