Skip to content

ci: pytest artifact upload #19466

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,34 @@ jobs:
--maxfail=50 --timeout=300 --durations=25 \
--cov-report= --cov=lib --log-level=DEBUG

- name: Collect failed result_images
if: failure()
run: |
mkdir failed
failed_test=()
for folder in result_images/*; do
for filename in $folder/*; do
if [[ $filename == *"-diff"* ]]; then
testname="${filename/-failed-diff/*}"
failed_test=(${failed_test[@]} $testname)
fi
done
done
for path in "${failed_test[@]}"; do
# Has to fix paths with '[png]' -> '\[png\]'
parsed=`echo $path | sed 's/[]]/\\\\]/g' | sed 's/[[]/\\\\[/g'`
ls $parsed
cp $parsed failed/
done

- name: Upload pytest test results
uses: actions/upload-artifact@v2
if: failure()
with:
name: failed_images-${{ matrix.python-version }}-${{ matrix.os }}
retention-days: 3
path: failed/

- name: Filter C coverage
run: |
lcov --capture --directory . --output-file coverage.info
Expand Down