Skip to content

Commit a8cf1b4

Browse files
Add artifact upload on failure.
1 parent 1b53b49 commit a8cf1b4

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

.github/workflows/pytest.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,18 @@ jobs:
5757
flake8 matplotview --count --select=E9,F63,F7,F82 --show-source --statistics
5858
flake8 matplotview --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
5959
- name: Test with pytest
60+
id: pytest
6061
run: |
6162
pytest
6263
64+
- name: Upload images on failure
65+
uses: actions/upload-artifact@v4
66+
if: ${{ failure() && steps.pytest.conclusion == 'failure' }}
67+
with:
68+
name: test-result-images
69+
retention-days: 1
70+
path: result_images/
71+
6372
test-windows:
6473

6574
runs-on: windows-latest
@@ -82,5 +91,14 @@ jobs:
8291
pip install pytest
8392
pip install -r requirements.txt
8493
- name: Test with pytest
94+
id: pytest
8595
run: |
86-
pytest
96+
pytest
97+
98+
- name: Upload images on failure
99+
uses: actions/upload-artifact@v4
100+
if: ${{ failure() && steps.pytest.conclusion == 'failure' }}
101+
with:
102+
name: test-result-images
103+
retention-days: 1
104+
path: result_images/

0 commit comments

Comments
 (0)