summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2022-07-05 14:29:24 +0100
committerDavid Robertson <davidr@element.io>2022-07-12 14:46:16 +0100
commitb3a72a6ecc0324e14b47565cae3c0c2e4e8d6e00 (patch)
treebd996d1610f7e1b5e5d7af3b15b7ff6b80c0db98
parentMerge branch 'master' into develop (diff)
downloadsynapse-b3a72a6ecc0324e14b47565cae3c0c2e4e8d6e00.tar.xz
Jump directly to failure in gotestfmt
-rw-r--r--.ci/complement_package.gotpl13
1 files changed, 13 insertions, 0 deletions
diff --git a/.ci/complement_package.gotpl b/.ci/complement_package.gotpl

index e1625fd31f..d189fc9ac4 100644 --- a/.ci/complement_package.gotpl +++ b/.ci/complement_package.gotpl
@@ -26,6 +26,19 @@ which is under the Unlicense licence. {{- with .Output -}} {{- . -}}{{- "\n" -}} {{- end -}} + + {{- /* Output an error marker if there are any failing tests, so GitHub will skip straight to them */ -}} + {{- $anyFailures := false -}} + {{- range .TestCases -}} + {{- if and (ne .Result "PASS") (ne .Result "SKIP") -}} + {{- $anyFailures = true -}} + {{- end -}} + {{- end -}} + {{- if $anyFailures -}} + ::error title=Test Failures::At least one test failed + {{- printf "\n" -}} + {{- end -}} + {{- with .TestCases -}} {{- /* Failing tests are first */ -}} {{- range . -}}