From 7436eebf334b104eb4a034487681b45045abbd31 Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Thu, 17 Mar 2022 20:03:14 -0500 Subject: [PATCH] Bat test (#1226) * CI: print out pytest logs on failure * ci(pytest-workflow): cat => bat * Introduce bug * Use batcat * Force fancification * ci: Use colored output for pytest * Revert "Introduce bug" This reverts commit bc78e5e8d144a823e70f6c57265ac80db687e5fe. Co-authored-by: Gregor Sturm --- .github/workflows/pytest-workflow.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pytest-workflow.yml b/.github/workflows/pytest-workflow.yml index b2be6aa3..2e4f70f8 100644 --- a/.github/workflows/pytest-workflow.yml +++ b/.github/workflows/pytest-workflow.yml @@ -86,17 +86,13 @@ jobs: # Test the module - name: Run pytest-workflow # 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 --git-aware + run: TMPDIR=~ PROFILE=${{ matrix.profile }} pytest --tag ${{ matrix.tags }} --symlink --kwdof --git-aware --color=yes - 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 + sudo apt install bat > /dev/null + batcat --decorations=always --color=always /home/runner/pytest_workflow_*/*/log.{out,err} - name: Upload logs on failure if: failure()