From 55ea3f20618ba5630595164babc9a64c0a787080 Mon Sep 17 00:00:00 2001 From: Gregor Sturm Date: Fri, 21 Jan 2022 07:51:28 +0100 Subject: [PATCH] CI: print out pytest logs on failure (#1220) --- .github/workflows/pytest-workflow.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/pytest-workflow.yml b/.github/workflows/pytest-workflow.yml index cc7c9313..272e1f1d 100644 --- a/.github/workflows/pytest-workflow.yml +++ b/.github/workflows/pytest-workflow.yml @@ -93,6 +93,16 @@ jobs: # only use one thread for pytest-workflow to avoid race condition on conda cache. run: TMPDIR=~ PROFILE=${{ matrix.profile }} pytest --tag ${{ matrix.tags }} --symlink --kwdof + - name: Output log on failure + if: failure() + run: | + echo "======> log.out <=======" + cat /home/runner/pytest_workflow_*/*/log.out + echo + echo + echo "======> log.err <=======" + cat /home/runner/pytest_workflow_*/*/log.err + - name: Upload logs on failure if: failure() uses: actions/upload-artifact@v2