test: run integration tests split
Signed-off-by: Joan Fontanals Martinez <joan.martinez@jina.ai>
This commit is contained in:
parent
d3e61fa11a
commit
7197e3ff10
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue