summary refs log tree commit diff
path: root/.github
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2022-03-07 12:24:06 +0000
committerGitHub <noreply@github.com>2022-03-07 12:24:06 +0000
commit0211f18d65b20c9bd77e64f296f8790f4267cf28 (patch)
treea9619c8344bd7b5caecffc175e485cd033aaae4c /.github
parentMerge remote-tracking branch 'origin/release-v1.54' into develop (diff)
downloadsynapse-0211f18d65b20c9bd77e64f296f8790f4267cf28.tar.xz
Switch the `tests-done` job to an Action (#12161)
I've factored it out for easier use in other workflows.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/tests.yml30
1 files changed, 9 insertions, 21 deletions
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 3bce95b0e0..613a773775 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -388,34 +388,22 @@ jobs:
   tests-done:
     if: ${{ always() }}
     needs:
+      - check-sampleconfig
       - lint
       - lint-crlf
       - lint-newsfile
       - trial
       - trial-olddeps
       - sytest
+      - export-data
       - portdb
       - complement
     runs-on: ubuntu-latest
     steps:
-      - name: Set build result
-        env:
-          NEEDS_CONTEXT: ${{ toJSON(needs) }}
-        # the `jq` incantation dumps out a series of "<job> <result>" lines.
-        # we set it to an intermediate variable to avoid a pipe, which makes it
-        # hard to set $rc.
-        run: |
-          rc=0
-          results=$(jq -r 'to_entries[] | [.key,.value.result] | join(" ")' <<< $NEEDS_CONTEXT)
-          while read job result ; do
-              # The newsfile lint may be skipped on non PR builds
-              if [ $result == "skipped" ] && [ $job == "lint-newsfile" ]; then
-                continue
-              fi
-
-              if [ "$result" != "success" ]; then
-                  echo "::set-failed ::Job $job returned $result"
-                  rc=1
-              fi
-          done <<< $results
-          exit $rc
+      - uses: matrix-org/done-action@v2
+        with:
+          needs: ${{ toJSON(needs) }}
+
+          # The newsfile lint may be skipped on non PR builds
+          skippable:
+            lint-newsfile