From d8a71d217c7d889f9eb0410ea5afed10108aa798 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20M=C3=B6hlmann?= Date: Wed, 11 Sep 2024 20:51:18 +0300 Subject: [PATCH] test: upload integration server logs as artifacts (#8600) # Which Problems Are Solved Upload the integration test server logs as artifacts, even if the tests fail. Before this change logs where printed through the Makefile. However if a test would fail, the logs wouldn't get printed. # How the Problems Are Solved - Add an extra build step that pushes `tmp/zitadel.log` and `tmp/race.log.$pid` to artificats storage. - Logs are no longer printed in the `core_integration_reports` Makefile recipe. # Additional Changes Do not remove coverage data when generating the coverage report in `core_integration_reports`. This is to prevent future "File not found" erros when running the command repeatedly. # Additional Context Reported as internal feedback --- .github/workflows/core-integration-test.yml | 9 +++++++++ Makefile | 2 -- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/core-integration-test.yml b/.github/workflows/core-integration-test.yml index b790db01d7..2673d4addf 100644 --- a/.github/workflows/core-integration-test.yml +++ b/.github/workflows/core-integration-test.yml @@ -74,6 +74,15 @@ jobs: ZITADEL_MASTERKEY: MasterkeyNeedsToHave32Characters INTEGRATION_DB_FLAVOR: postgres run: make core_integration_test + - + name: upload server logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: integration-test-server-logs + path: | + tmp/zitadel.log + tmp/race.log.* - name: publish coverage uses: codecov/codecov-action@v4.3.0 diff --git a/Makefile b/Makefile index 56788e9f34..17e1bbd9b7 100644 --- a/Makefile +++ b/Makefile @@ -150,8 +150,6 @@ core_integration_server_stop: .PHONY: core_integration_reports core_integration_reports: go tool covdata textfmt -i=tmp/coverage -pkg=github.com/zitadel/zitadel/internal/...,github.com/zitadel/zitadel/cmd/... -o profile.cov - $(RM) -r tmp/coverage - cat tmp/zitadel.log .PHONY: core_integration_test core_integration_test: core_integration_server_start core_integration_test_packages core_integration_server_stop core_integration_reports