Skip to content

Commit

Permalink
Ensure failed conformance tests are caught in pipeline & fix local ma…
Browse files Browse the repository at this point in the history
…ke command (#1203)

* Fail conf tests in pipeline & fix local make command
  • Loading branch information
ciarams87 authored Nov 6, 2023
1 parent 40143a1 commit 60b562b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,11 @@ jobs:
working-directory: ./conformance

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

- name: Upload profile to release
Expand Down
5 changes: 2 additions & 3 deletions conformance/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,8 @@ run-conformance-tests: ## Run conformance tests
--report-output=output.txt; cat output.txt" | tee output.txt
sed -e '1,/CONFORMANCE PROFILE/d' output.txt > conformance-profile.yaml
rm output.txt
$(eval result_core=$(shell cat conformance-profile.yaml | yq '.profiles[0].core.result'))
$(eval result_extended=$(shell cat conformance-profile.yaml | yq '.profiles[0].extended.result'))
[ "$(result_core)" != "failure" ] && [ "$(result_extended)" != "failure" ] || exit 2
[ $(shell cat conformance-profile.yaml | yq '.profiles[0].core.result') != "failure" ] \
&& [ $(shell cat conformance-profile.yaml | yq '.profiles[0].extended.result') != "failure" ] || exit 2

.PHONY: cleanup-conformance-tests
cleanup-conformance-tests: ## Clean up conformance tests fixtures
Expand Down

0 comments on commit 60b562b

Please sign in to comment.