From a01f8f50c9dd2a9b2959a87d77da72993a05b327 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 2f9cb696f21..5bf050cc7ad 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 38bf5f6721e..76f17728056 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 08c0a36bba4..271b683e7f8 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 ea2b1402c09..731def46075 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 c00423fb555..75a0d080c90 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 9d7127adf5a7e19b0599828e2aab9d3f1791486d 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"