From 882481ac91e7a7e23bc897be19cadb1a55ffaa5d Mon Sep 17 00:00:00 2001 From: dongmen <20351731+asddongmen@users.noreply.github.com> Date: Mon, 30 Dec 2024 19:14:11 +0800 Subject: [PATCH] tests: upload ci logs (#741) Signed-off-by: dongmen <414110582@qq.com> --- .github/workflows/integration_test_mysql.yaml | 38 +++++++++---------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/.github/workflows/integration_test_mysql.yaml b/.github/workflows/integration_test_mysql.yaml index 9cd09ade..45770c1a 100644 --- a/.github/workflows/integration_test_mysql.yaml +++ b/.github/workflows/integration_test_mysql.yaml @@ -71,27 +71,25 @@ jobs: run: | export TICDC_NEWARCH=true && make integration_test CASE=changefeed_reconstruct - # only upload logs of the last case - # - name: Copy logs to hack permission - # if: ${{ always() }} - # run: | - # DIR=$(sudo find /tmp/tidb_cdc_test/ -type d -name 'sync_diff' -exec dirname {} \;) - # CASE=$(basename $DIR) - # mkdir -p ./logs/$CASE - # cat $DIR/stdout.log - # tail -n 10 $DIR/cdc.log - # sudo cp -r -L $DIR/{cdc.log,stdout.log,sync_diff} ./logs/$CASE/ - # sudo chown -R runner ./logs - # sudo tar -czvf ./logs.tar.gz ./logs - + - name: Copy logs to hack permission + if: ${{ always() }} + run: | + DIR=$(sudo find /tmp/tidb_cdc_test/ -type d -name 'cdc_data' -exec dirname {} \;) + CASE=$(basename $DIR) + mkdir -p ./logs/$CASE + cat $DIR/stdout.log + tail -n 10 $DIR/cdc.log + sudo cp -r -L $DIR/{*.log,sync_diff} ./logs/$CASE/ + sudo chown -R runner ./logs + sudo tar -czvf ./logs.tar.gz ./logs # Update logs as artifact seems not stable, so we set `continue-on-error: true` here. - # - name: Upload logs - # uses: actions/upload-artifact@v4 - # if: ${{ always() }} - # with: - # name: upstream-switch-logs - # path: | - # ./logs.tar.gz + - name: Upload logs + uses: actions/upload-artifact@v4 + if: ${{ always() }} + with: + name: upstream-switch-logs + path: | + ./logs.tar.gz failover_e2e_test: runs-on: ubuntu-latest