CI: print out pytest logs on failure (#1220)

This commit is contained in:
Gregor Sturm 2022-01-21 07:51:28 +01:00 committed by GitHub
parent 9573e7e53d
commit 55ea3f2061
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. # 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 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 - name: Upload logs on failure
if: failure() if: failure()
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2