From 18dffc55c19b570a321ec20cb36839e6e66909c2 Mon Sep 17 00:00:00 2001 From: Dmitry Kropachev Date: Mon, 5 Aug 2024 11:45:05 -0400 Subject: [PATCH] Store debug logs in gh artifacts --- .github/workflows/integration-tests.yml | 30 ++++++++++++++++++++----- .gitignore | 2 +- ci/run_integration_test.sh | 5 ++++- 3 files changed, 29 insertions(+), 8 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 8c364e93a1..73bd162dd9 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -24,19 +24,37 @@ jobs: steps: - uses: actions/checkout@v3 + - name: setup pyenv ${{ matrix.python-version }} uses: "gabrielfalcao/pyenv-action@v16" with: default: 2.7.14 versions: ${{ matrix.python-version }} - - name: Test with pytest + + - name: Integration tests + id: integration-tests run: | export EVENT_LOOP_MANAGER=${{ matrix.event_loop_manager }} export SCYLLA_VERSION='release:5.1' - ./ci/run_integration_test.sh tests/integration/standard/ tests/integration/cqlengine/ - - - name: Test tablets + DEBUG_LOG_FILE=integration-tests.log ./ci/run_integration_test.sh tests/integration/standard/ tests/integration/cqlengine/ + + - name: Store debug logs for integration tests + if: failure() && steps.integration-tests.outcome == 'failure' + uses: actions/upload-artifact@v4 + with: + name: integration-tests + path: integration-tests.log + + - name: Integration tablets tests + id: integration-tablets-tests run: | export EVENT_LOOP_MANAGER=${{ matrix.event_loop_manager }} - export SCYLLA_VERSION='unstable/master:2024-01-17T17:56:00Z' - ./ci/run_integration_test.sh tests/integration/experiments/ + export SCYLLA_VERSION='release:6.0.2' + DEBUG_LOG_FILE=integration-tablets-tests.log ./ci/run_integration_test.sh tests/integration/experiments/ + + - name: Store debug logs for integration tablets tests + if: failure() && steps.integration-tablets-tests.outcome == 'failure' + uses: actions/upload-artifact@v4 + with: + name: integration-tablets-tests + path: integration-tablets-tests.log diff --git a/.gitignore b/.gitignore index 4541d034f0..74c7c1d9b6 100644 --- a/.gitignore +++ b/.gitignore @@ -43,4 +43,4 @@ tests/unit/cython/bytesio_testhelper.c #iPython *.ipynb - +debug.log diff --git a/ci/run_integration_test.sh b/ci/run_integration_test.sh index 2796a33e61..cd2f35eb88 100755 --- a/ci/run_integration_test.sh +++ b/ci/run_integration_test.sh @@ -37,5 +37,8 @@ ccm remove # run test export MAPPED_SCYLLA_VERSION=3.11.4 -PROTOCOL_VERSION=4 pytest -rf --import-mode append $* + +DEBUG_LOG_FILE="" +[[ -n "${LOG_FILE}" ]] && DEBUG_LOG_FILE="--log-file-level=debug --log-file=${LOG_FILE}" +PROTOCOL_VERSION=4 pytest -vv -s ${DEBUG_LOG_FILE} --log-cli-level=info -rf --import-mode append $*