Skip to content

Commit d6d583e

Browse files
committed
ci: run aggtests in parallel using xargs
Our ci has parallel compilation setup, so multiple pipelines can be compiled at once. We use xargs -P to run runtime_aggtests in parallel so we can take advantage of it and speed up our ci. Signed-off-by: Swanand Mulay <73115739+swanandx@users.noreply.github.com>
1 parent a8c494a commit d6d583e

File tree

2 files changed

+24
-13
lines changed

2 files changed

+24
-13
lines changed

.github/workflows/test-integration-runtime.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151
run: uv run --locked ./tests/runtime_aggtest/run.sh
5252
working-directory: python
5353
env:
54+
RUNTIME_AGGTEST_JOBS: ${{ vars.RUNTIME_AGGTEST_JOBS }}
5455
PYTHONPATH: ${{ github.workspace }}/python
5556
FELDERA_TLS_INSECURE: true
5657

python/tests/runtime_aggtest/run.sh

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,29 @@
22

33
set -ex
44

5-
function runtest() {
5+
TESTS=(
6+
"aggregate_tests/main.py"
7+
"aggregate_tests2/main.py"
8+
"aggregate_tests3/main.py"
9+
"aggregate_tests4/main.py"
10+
"aggregate_tests5/main.py"
11+
"aggregate_tests6/main.py"
12+
"arithmetic_tests/main.py"
13+
"asof_tests/main.py"
14+
"complex_type_tests/main.py"
15+
"illarg_tests/main.py"
16+
"negative_tests/main.py"
17+
"orderby_tests/main.py"
18+
"variant_tests/main.py"
19+
)
20+
21+
function run_one() {
622
uv run --locked $PYTHONPATH/tests/runtime_aggtest/$1
723
}
824

9-
runtest aggregate_tests/main.py
10-
runtest aggregate_tests2/main.py
11-
runtest aggregate_tests3/main.py
12-
runtest aggregate_tests4/main.py
13-
runtest aggregate_tests5/main.py
14-
runtest aggregate_tests6/main.py
15-
runtest arithmetic_tests/main.py
16-
runtest complex_type_tests/main.py
17-
runtest orderby_tests/main.py
18-
runtest variant_tests/main.py
19-
runtest illarg_tests/main.py
20-
runtest negative_tests/main.py
25+
if [ "${RUNTIME_AGGTEST_JOBS:-1}" -le 1 ]; then
26+
for t in "${TESTS[@]}"; do run_one "$t"; done
27+
else
28+
echo "Running tests in parallel: ${RUNTIME_AGGTEST_JOBS} jobs"
29+
printf '%s\n' "${TESTS[@]}" | xargs -P "${RUNTIME_AGGTEST_JOBS}" -I{} bash -e -c 'echo "Running: {}"; uv run --locked "$PYTHONPATH/tests/runtime_aggtest/{}"'
30+
fi

0 commit comments

Comments
 (0)