summary refs log tree commit diff
path: root/.github
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2022-09-16 16:25:54 +0100
committerGitHub <noreply@github.com>2022-09-16 16:25:54 +0100
commit642c4b253d0d41b7179e59863d3d7375eb5730ec (patch)
tree056e1fcf2615bc3301de80efbf9441c02421b5f6 /.github
parentMinor speedups to CI linting (#13827) (diff)
downloadsynapse-642c4b253d0d41b7179e59863d3d7375eb5730ec.tar.xz
Compare ported to unported PG schemas in portdb test job (#13808)
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/tests.yml27
1 files changed, 23 insertions, 4 deletions
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 4801fe7316..91a080cca0 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -362,18 +362,22 @@ jobs:
 
     steps:
       - uses: actions/checkout@v2
-      - run: sudo apt-get -qq install xmlsec1
+      - run: sudo apt-get -qq install xmlsec1 postgresql-client
       - uses: matrix-org/setup-python-poetry@v1
         with:
           extras: "postgres"
       - run: .ci/scripts/test_export_data_command.sh
+        env:
+          PGHOST: localhost
+          PGUSER: postgres
+          PGPASSWORD: postgres
+          PGDATABASE: postgres
+
 
   portdb:
     if: ${{ !failure() && !cancelled() }} # Allow previous steps to be skipped, but not fail
     needs: linting-done
     runs-on: ubuntu-latest
-    env:
-      TOP: ${{ github.workspace }}
     strategy:
       matrix:
         include:
@@ -399,12 +403,27 @@ jobs:
 
     steps:
       - uses: actions/checkout@v2
-      - run: sudo apt-get -qq install xmlsec1
+      - run: sudo apt-get -qq install xmlsec1 postgresql-client
       - uses: matrix-org/setup-python-poetry@v1
         with:
           python-version: ${{ matrix.python-version }}
           extras: "postgres"
       - run: .ci/scripts/test_synapse_port_db.sh
+        id: run_tester_script
+        env:
+          PGHOST: localhost
+          PGUSER: postgres
+          PGPASSWORD: postgres
+          PGDATABASE: postgres
+      - name: "Upload schema differences"
+        uses: actions/upload-artifact@v3
+        if: ${{ failure() && !cancelled() && steps.run_tester_script.outcome == 'failure' }}
+        with:
+          name: Schema dumps
+          path: |
+            unported.sql
+            ported.sql
+            schema_diff
 
   complement:
     if: "${{ !failure() && !cancelled() }}"