summary refs log tree commit diff
path: root/.github
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2021-07-22 11:10:30 +0100
committerGitHub <noreply@github.com>2021-07-22 11:10:30 +0100
commitf1347bcfdcf7e0ff54a81cd05618af8882e4a757 (patch)
treebfbaeff72fd874fd03156888327fd6c2b566ed73 /.github
parentDrop xenial-support hacks (#10429) (diff)
downloadsynapse-f1347bcfdcf7e0ff54a81cd05618af8882e4a757.tar.xz
Fix the tests-done Github Actions job (#10444)
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/tests.yml19
1 files changed, 18 insertions, 1 deletions
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index cef4439477..9759163290 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -347,7 +347,12 @@ jobs:
 
   # a job which marks all the other jobs as complete, thus allowing PRs to be merged.
   tests-done:
+    if: ${{ always() }}
     needs:
+      - lint
+      - lint-crlf
+      - lint-newsfile
+      - lint-sdist
       - trial
       - trial-olddeps
       - sytest
@@ -355,4 +360,16 @@ jobs:
       - complement
     runs-on: ubuntu-latest
     steps:
-      - run: "true"    
\ No newline at end of file
+      - name: Set build result
+        env:
+          NEEDS_CONTEXT: ${{ toJSON(needs) }}
+        # the `jq` incantation dumps out a series of "<job> <result>" lines
+        run: |
+          set -o pipefail
+          jq -r 'to_entries[] | [.key,.value.result] | join(" ")' \
+                          <<< $NEEDS_CONTEXT |
+              while read job result; do
+                  if [ "$result" != "success" ]; then
+                      echo "::set-failed ::Job $job returned $result"
+                  fi
+              done