Skip to content

Commit 60b562b

Browse files
authoredNov 6, 2023
Ensure failed conformance tests are caught in pipeline & fix local make command (#1203)
* Fail conf tests in pipeline & fix local make command
1 parent 40143a1 commit 60b562b

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed
 

Diff for: ‎.github/workflows/conformance.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,11 @@ jobs:
149149
working-directory: ./conformance
150150

151151
- name: Run conformance tests
152-
run: make run-conformance-tests TAG=${{ github.sha }} VERSION=${{ github.ref_name }}
152+
run: |
153+
make run-conformance-tests TAG=${{ github.sha }} VERSION=${{ github.ref_name }}
154+
core_result=$(cat conformance-profile.yaml | yq '.profiles[0].core.result')
155+
extended_result=$(cat conformance-profile.yaml | yq '.profiles[0].extended.result')
156+
if [ "${core_result}" == "failure" ] || [ "${extended_result}" == "failure" ]; then echo "Conformance test failed, see above for details." && exit 2; fi
153157
working-directory: ./conformance
154158

155159
- name: Upload profile to release

Diff for: ‎conformance/Makefile

+2-3
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,8 @@ run-conformance-tests: ## Run conformance tests
7979
--report-output=output.txt; cat output.txt" | tee output.txt
8080
sed -e '1,/CONFORMANCE PROFILE/d' output.txt > conformance-profile.yaml
8181
rm output.txt
82-
$(eval result_core=$(shell cat conformance-profile.yaml | yq '.profiles[0].core.result'))
83-
$(eval result_extended=$(shell cat conformance-profile.yaml | yq '.profiles[0].extended.result'))
84-
[ "$(result_core)" != "failure" ] && [ "$(result_extended)" != "failure" ] || exit 2
82+
[ $(shell cat conformance-profile.yaml | yq '.profiles[0].core.result') != "failure" ] \
83+
&& [ $(shell cat conformance-profile.yaml | yq '.profiles[0].extended.result') != "failure" ] || exit 2
8584

8685
.PHONY: cleanup-conformance-tests
8786
cleanup-conformance-tests: ## Clean up conformance tests fixtures

0 commit comments

Comments
 (0)
Please sign in to comment.