* 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 bc78e5e8d1.

Co-authored-by: Gregor Sturm <mail@gregor-sturm.de>
This commit is contained in:
Edmund Miller 2022-03-17 20:03:14 -05:00 committed by GitHub
parent f469045a95
commit 7436eebf33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -86,17 +86,13 @@ jobs:
# Test the module # Test the module
- name: Run pytest-workflow - name: Run pytest-workflow
# only use one thread for pytest-workflow to avoid race condition on conda cache. # 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 - name: Output log on failure
if: failure() if: failure()
run: | run: |
echo "======> log.out <=======" sudo apt install bat > /dev/null
cat /home/runner/pytest_workflow_*/*/log.out batcat --decorations=always --color=always /home/runner/pytest_workflow_*/*/log.{out,err}
echo
echo
echo "======> log.err <======="
cat /home/runner/pytest_workflow_*/*/log.err
- name: Upload logs on failure - name: Upload logs on failure
if: failure() if: failure()