Make failing conformance tests also fail the build (#715)
* Setting pipefail option in github workflow and purposefully making the Redis test fail to verify that the build fails (as expected) * Disabling in order processing for Redis (re-disabling) and Azure Service Bus
This commit is contained in:
parent
4a0011bcbd
commit
4f79098df2
|
@ -195,6 +195,7 @@ jobs:
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
|
set -e
|
||||||
KIND=$(echo ${{ matrix.component }} | cut -d. -f1)
|
KIND=$(echo ${{ matrix.component }} | cut -d. -f1)
|
||||||
NAME=$(echo ${{ matrix.component }} | cut -d. -f2-)
|
NAME=$(echo ${{ matrix.component }} | cut -d. -f2-)
|
||||||
KIND_UPPER="$(tr '[:lower:]' '[:upper:]' <<< ${KIND:0:1})${KIND:1}"
|
KIND_UPPER="$(tr '[:lower:]' '[:upper:]' <<< ${KIND:0:1})${KIND:1}"
|
||||||
|
@ -205,8 +206,16 @@ jobs:
|
||||||
|
|
||||||
echo "Running tests for Test${KIND_UPPER}Conformance/${KIND}/${NAME} ... "
|
echo "Running tests for Test${KIND_UPPER}Conformance/${KIND}/${NAME} ... "
|
||||||
|
|
||||||
|
set +e
|
||||||
go test -v -tags=conftests -count=1 ./tests/conformance \
|
go test -v -tags=conftests -count=1 ./tests/conformance \
|
||||||
--run="Test${KIND_UPPER}Conformance/${NAME}" 2>&1 | tee output.log
|
--run="Test${KIND_UPPER}Conformance/${NAME}" 2>&1 | tee output.log
|
||||||
|
status=$?
|
||||||
|
echo "Completed tests for Test${KIND_UPPER}Conformance/${KIND}/${NAME} ... "
|
||||||
|
if test $status -ne 0; then
|
||||||
|
echo "Setting CONFORMANCE_FAILURE"
|
||||||
|
echo "CONFORMANCE_FAILURE=true" >> $GITHUB_ENV
|
||||||
|
fi
|
||||||
|
set -e
|
||||||
|
|
||||||
# Fail the step if we found no test to run
|
# Fail the step if we found no test to run
|
||||||
if grep -q "warning: no tests to run" output.log ; then
|
if grep -q "warning: no tests to run" output.log ; then
|
||||||
|
@ -229,3 +238,11 @@ jobs:
|
||||||
echo "Cleaning up the certificate file $CERT_FILE..."
|
echo "Cleaning up the certificate file $CERT_FILE..."
|
||||||
rm $CERT_FILE
|
rm $CERT_FILE
|
||||||
done
|
done
|
||||||
|
|
||||||
|
- name: Check conformance test passed
|
||||||
|
continue-on-error: false
|
||||||
|
run: |
|
||||||
|
echo "CONFORMANCE_FAILURE=$CONFORMANCE_FAILURE"
|
||||||
|
if [[ -v CONFORMANCE_FAILURE ]]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
|
@ -14,6 +14,7 @@ components:
|
||||||
config:
|
config:
|
||||||
pubsubName: azure-servicebus
|
pubsubName: azure-servicebus
|
||||||
testTopicName: dapr-conf-test
|
testTopicName: dapr-conf-test
|
||||||
|
checkInOrderProcessing: false
|
||||||
- component: redis
|
- component: redis
|
||||||
allOperations: true
|
allOperations: true
|
||||||
config:
|
config:
|
||||||
|
|
Loading…
Reference in New Issue