mirror of https://github.com/citusdata/citus.git
Fixes tests parameter in GITHUB_OUTPUT
Parameters are stored in GITHUB_OUTPUT env variable in key value format. When value has an emty space, GH Actions throws an error. In case of multiple tests, I replaced empty space with comma. Additionally, used curly braces in parameter usage to make it stable for various characters in variablespull/7258/head
parent
788e09a39a
commit
a150de0c9f
|
@ -87,7 +87,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3.5.0
|
- uses: actions/checkout@v3.5.0
|
||||||
- name: Expose $PG_MAJOR to Github Env
|
- name: Expose $PG_MAJOR to Github Env
|
||||||
run: echo "PG_MAJOR=${PG_MAJOR}" >> $GITHUB_ENV
|
run: echo "PG_MAJOR=${PG_MAJOR}" >> ${GITHUB_ENV}
|
||||||
shell: bash
|
shell: bash
|
||||||
- name: Build
|
- name: Build
|
||||||
run: "./ci/build-citus.sh"
|
run: "./ci/build-citus.sh"
|
||||||
|
@ -243,10 +243,10 @@ jobs:
|
||||||
}
|
}
|
||||||
print substr(parts[X], 1, length(parts[X])-1)
|
print substr(parts[X], 1, length(parts[X])-1)
|
||||||
}')
|
}')
|
||||||
echo $TESTS
|
echo ${TESTS}
|
||||||
gosu circleci \
|
gosu circleci \
|
||||||
make -C src/test/regress \
|
make -C src/test/regress \
|
||||||
check-arbitrary-configs parallel=4 CONFIGS=$TESTS
|
check-arbitrary-configs parallel=4 CONFIGS=${TESTS}
|
||||||
- uses: "./.github/actions/save_logs_and_results"
|
- uses: "./.github/actions/save_logs_and_results"
|
||||||
if: always()
|
if: always()
|
||||||
- uses: "./.github/actions/upload_coverage"
|
- uses: "./.github/actions/upload_coverage"
|
||||||
|
@ -328,7 +328,7 @@ jobs:
|
||||||
bindir=/usr/lib/postgresql/${PG_MAJOR}/bin \
|
bindir=/usr/lib/postgresql/${PG_MAJOR}/bin \
|
||||||
citus-old-version=${citus_version} \
|
citus-old-version=${citus_version} \
|
||||||
citus-pre-tar=/install-pg${PG_MAJOR}-citus${citus_version}.tar \
|
citus-pre-tar=/install-pg${PG_MAJOR}-citus${citus_version}.tar \
|
||||||
citus-post-tar=${GITHUB_WORKSPACE}/install-$PG_MAJOR.tar; \
|
citus-post-tar=${GITHUB_WORKSPACE}/install-${PG_MAJOR}.tar; \
|
||||||
done;
|
done;
|
||||||
# run make check-citus-upgrade-mixed for all citus versions
|
# run make check-citus-upgrade-mixed for all citus versions
|
||||||
# the image has ${CITUS_VERSIONS} set with all verions it contains the binaries of
|
# the image has ${CITUS_VERSIONS} set with all verions it contains the binaries of
|
||||||
|
@ -339,7 +339,7 @@ jobs:
|
||||||
citus-old-version=${citus_version} \
|
citus-old-version=${citus_version} \
|
||||||
bindir=/usr/lib/postgresql/${PG_MAJOR}/bin \
|
bindir=/usr/lib/postgresql/${PG_MAJOR}/bin \
|
||||||
citus-pre-tar=/install-pg${PG_MAJOR}-citus${citus_version}.tar \
|
citus-pre-tar=/install-pg${PG_MAJOR}-citus${citus_version}.tar \
|
||||||
citus-post-tar=${GITHUB_WORKSPACE}/install-$PG_MAJOR.tar; \
|
citus-post-tar=${GITHUB_WORKSPACE}/install-${PG_MAJOR}.tar; \
|
||||||
done;
|
done;
|
||||||
- uses: "./.github/actions/save_logs_and_results"
|
- uses: "./.github/actions/save_logs_and_results"
|
||||||
if: always()
|
if: always()
|
||||||
|
@ -432,14 +432,14 @@ jobs:
|
||||||
- name: Detect regression tests need to be ran
|
- name: Detect regression tests need to be ran
|
||||||
id: detect-regression-tests
|
id: detect-regression-tests
|
||||||
run: |-
|
run: |-
|
||||||
detected_changes=$(git diff origin/main... --name-only --diff-filter=AM | (grep 'src/test/regress/sql/.*\.sql\|src/test/regress/spec/.*\.spec\|src/test/regress/citus_tests/test/test_.*\.py' || true))
|
detected_changes=$(git diff origin/main... --name-only --diff-filter=AM | grep 'src/test/regress/sql/.*\.sql\|src/test/regress/spec/.*\.spec\|src/test/regress/citus_tests/test/test_.*\.py' | tr '\n' ',')
|
||||||
tests=${detected_changes}
|
tests=$(echo "${detected_changes}" | sed 's/,$//')
|
||||||
if [ -z "$tests" ]; then
|
if [ -z "${tests}" ]; then
|
||||||
echo "No test found."
|
echo "No test found."
|
||||||
else
|
else
|
||||||
echo "Detected tests " $tests
|
echo "Detected tests " ${tests}
|
||||||
fi
|
fi
|
||||||
echo tests="$tests" >> "$GITHUB_OUTPUT"
|
echo tests="${tests}" >> "${GITHUB_OUTPUT}"
|
||||||
test-flakyness:
|
test-flakyness:
|
||||||
if: ${{ needs.test-flakyness-pre.outputs.tests != ''}}
|
if: ${{ needs.test-flakyness-pre.outputs.tests != ''}}
|
||||||
name: Test flakyness
|
name: Test flakyness
|
||||||
|
@ -463,11 +463,11 @@ jobs:
|
||||||
- name: Run minimal tests
|
- name: Run minimal tests
|
||||||
run: |-
|
run: |-
|
||||||
tests="${{ needs.test-flakyness-pre.outputs.tests }}"
|
tests="${{ needs.test-flakyness-pre.outputs.tests }}"
|
||||||
tests_array=($tests)
|
IFS=',' read -ra tests_array <<< "$tests"
|
||||||
for test in "${tests_array[@]}"
|
for test in "${tests_array[@]}"
|
||||||
do
|
do
|
||||||
test_name=$(echo "$test" | sed -r "s/.+\/(.+)\..+/\1/")
|
test_name=$(echo "${test}" | sed -r "s/.+\/(.+)\..+/\1/")
|
||||||
gosu circleci src/test/regress/citus_tests/run_test.py $test_name --repeat ${{ env.runs }} --use-base-schedule --use-whole-schedule-line
|
gosu circleci src/test/regress/citus_tests/run_test.py ${test_name} --repeat ${{ env.runs }} --use-base-schedule --use-whole-schedule-line
|
||||||
done
|
done
|
||||||
shell: bash
|
shell: bash
|
||||||
- uses: "./.github/actions/save_logs_and_results"
|
- uses: "./.github/actions/save_logs_and_results"
|
||||||
|
|
Loading…
Reference in New Issue