From 1c13dc34a7c0464419de7502d81af433ca9e1b11 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 4 Dec 2024 13:54:53 +0100 Subject: [PATCH 1/2] ci(integration): Print federation log file Signed-off-by: Joas Schilling --- .github/workflows/integration-mariadb.yml | 12 ++++++++++++ .github/workflows/integration-mysql.yml | 12 ++++++++++++ .github/workflows/integration-oci.yml | 12 ++++++++++++ .github/workflows/integration-pgsql.yml | 12 ++++++++++++ .github/workflows/integration-sqlite.yml | 12 ++++++++++++ 5 files changed, 60 insertions(+) diff --git a/.github/workflows/integration-mariadb.yml b/.github/workflows/integration-mariadb.yml index 0f3fd2149df..48b8d4d68cd 100644 --- a/.github/workflows/integration-mariadb.yml +++ b/.github/workflows/integration-mariadb.yml @@ -166,6 +166,18 @@ jobs: run: | cat data/nextcloud.log + - name: Check Federation log + if: always() + id: check_federation_log + uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0 + with: + files: "data/tests-talk-real-federated-server/data/nextcloud.log" + + - name: Print federation logs + if: always() && steps.check_federation_log.outputs.files_exists == 'true' + run: | + cat data/tests-talk-real-federated-server/data/nextcloud.log + summary: permissions: contents: none diff --git a/.github/workflows/integration-mysql.yml b/.github/workflows/integration-mysql.yml index 05197044bcf..77b520faa17 100644 --- a/.github/workflows/integration-mysql.yml +++ b/.github/workflows/integration-mysql.yml @@ -166,6 +166,18 @@ jobs: run: | cat data/nextcloud.log + - name: Check Federation log + if: always() + id: check_federation_log + uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0 + with: + files: "data/tests-talk-real-federated-server/data/nextcloud.log" + + - name: Print federation logs + if: always() && steps.check_federation_log.outputs.files_exists == 'true' + run: | + cat data/tests-talk-real-federated-server/data/nextcloud.log + summary: permissions: contents: none diff --git a/.github/workflows/integration-oci.yml b/.github/workflows/integration-oci.yml index 969b420aace..743774ae481 100644 --- a/.github/workflows/integration-oci.yml +++ b/.github/workflows/integration-oci.yml @@ -173,6 +173,18 @@ jobs: run: | cat data/nextcloud.log + - name: Check Federation log + if: always() + id: check_federation_log + uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0 + with: + files: "data/tests-talk-real-federated-server/data/nextcloud.log" + + - name: Print federation logs + if: always() && steps.check_federation_log.outputs.files_exists == 'true' + run: | + cat data/tests-talk-real-federated-server/data/nextcloud.log + summary: permissions: contents: none diff --git a/.github/workflows/integration-pgsql.yml b/.github/workflows/integration-pgsql.yml index b4b121a9d8d..67e573be44b 100644 --- a/.github/workflows/integration-pgsql.yml +++ b/.github/workflows/integration-pgsql.yml @@ -164,6 +164,18 @@ jobs: run: | cat data/nextcloud.log + - name: Check Federation log + if: always() + id: check_federation_log + uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0 + with: + files: "data/tests-talk-real-federated-server/data/nextcloud.log" + + - name: Print federation logs + if: always() && steps.check_federation_log.outputs.files_exists == 'true' + run: | + cat data/tests-talk-real-federated-server/data/nextcloud.log + summary: permissions: contents: none diff --git a/.github/workflows/integration-sqlite.yml b/.github/workflows/integration-sqlite.yml index 506cf06b236..321255d2673 100644 --- a/.github/workflows/integration-sqlite.yml +++ b/.github/workflows/integration-sqlite.yml @@ -152,6 +152,18 @@ jobs: run: | cat data/nextcloud.log + - name: Check Federation log + if: always() + id: check_federation_log + uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0 + with: + files: "data/tests-talk-real-federated-server/data/nextcloud.log" + + - name: Print federation logs + if: always() && steps.check_federation_log.outputs.files_exists == 'true' + run: | + cat data/tests-talk-real-federated-server/data/nextcloud.log + summary: permissions: contents: none From 22c96c304ac169d3963d25862d94e81b55ab5aa0 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 5 Dec 2024 10:12:00 +0100 Subject: [PATCH 2/2] ci: Don't destroy the federation instance on CI, so we can print the logs Signed-off-by: Joas Schilling --- tests/integration/run.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/integration/run.sh b/tests/integration/run.sh index 2311994f02e..5ad3cd73087 100755 --- a/tests/integration/run.sh +++ b/tests/integration/run.sh @@ -52,6 +52,9 @@ DESTROY_REAL_FEDERATED_SERVER=false if [ ! -d "$REAL_FEDERATED_SERVER_CONFIG_DIR" ] || NEXTCLOUD_CONFIG_DIR="$REAL_FEDERATED_SERVER_CONFIG_DIR" ${ROOT_DIR}/occ status | grep "installed: false"; then DESTROY_REAL_FEDERATED_SERVER=true + if [ $CI ]; then + DESTROY_REAL_FEDERATED_SERVER=false + fi echo '' echo -e "\033[0;31mReal federated server not installed in $REAL_FEDERATED_SERVER_CONFIG_DIR\033[0m" echo -e "\033[0;33mPerforming basic SQLite installation with data directory in $REAL_FEDERATED_SERVER_DATA_DIR\033[0m"