CI: print out pytest logs on failure

This commit is contained in:
Gregor Sturm 2022-01-20 08:55:43 +01:00 committed by GitHub
parent bb90e4fb78
commit beb6acb205
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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