Factor out Complement checking-out
3 files changed, 5 insertions, 10 deletions
diff --git a/.ci/scripts/setup_complement_prerequisites.sh b/.ci/scripts/setup_complement_prerequisites.sh
index 62cf19b450..4848901cbf 100755
--- a/.ci/scripts/setup_complement_prerequisites.sh
+++ b/.ci/scripts/setup_complement_prerequisites.sh
@@ -29,3 +29,8 @@ block Install custom gotestfmt template
cp synapse/.ci/complement_package.gotpl .gotestfmt/github/package.gotpl
endblock
+block Check out Complement
+ # Attempt to check out the same branch of Complement as the PR. If it
+ # doesn't exist, fallback to HEAD.
+ synapse/.ci/scripts/checkout_complement.sh
+endblock
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 6f37bc3970..4bc29c8207 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -340,11 +340,6 @@ jobs:
- name: Prepare Complement's Prerequisites
run: synapse/.ci/scripts/setup_complement_prerequisites.sh
- # Attempt to check out the same branch of Complement as the PR. If it
- # doesn't exist, fallback to HEAD.
- - name: Checkout complement
- run: synapse/.ci/scripts/checkout_complement.sh
-
- run: |
set -o pipefail
POSTGRES=${{ (matrix.database == 'Postgres') && 1 || '' }} WORKERS=${{ (matrix.arrangement == 'workers') && 1 || '' }} COMPLEMENT_DIR=`pwd`/complement synapse/scripts-dev/complement.sh -json 2>&1 | gotestfmt
diff --git a/.github/workflows/twisted_trunk.yml b/.github/workflows/twisted_trunk.yml
index 8b423b25e2..f35e82297f 100644
--- a/.github/workflows/twisted_trunk.yml
+++ b/.github/workflows/twisted_trunk.yml
@@ -135,11 +135,6 @@ jobs:
# NOT IN 1.1.12 poetry lock --check
working-directory: synapse
- # Attempt to check out the same branch of Complement as the PR. If it
- # doesn't exist, fallback to HEAD.
- - name: Checkout complement
- run: synapse/.ci/scripts/checkout_complement.sh
-
- run: |
set -o pipefail
TEST_ONLY_SKIP_DEP_HASH_VERIFICATION=1 POSTGRES=${{ (matrix.database == 'Postgres') && 1 || '' }} WORKERS=${{ (matrix.arrangement == 'workers') && 1 || '' }} COMPLEMENT_DIR=`pwd`/complement synapse/scripts-dev/complement.sh -json 2>&1 | gotestfmt
|