Skip to content

Commit 9c45b7d

Browse files
authored
devops: collect test results (#52)
1 parent c55cdf8 commit 9c45b7d

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,14 @@ jobs:
7070
if: ${{ matrix.os == 'windows-latest' }}
7171
# pytest-xdist does not exit on Windows
7272
# https://github.com/pytest-dev/pytest-xdist/issues/60
73-
run: pytest -vv --browser=${{ matrix.browser }}
73+
run: pytest -vv --browser=${{ matrix.browser }} --junitxml=junit/test-results-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.browser }}.xml
7474
- name: Test
7575
if: ${{ matrix.os != 'windows-latest' }}
76-
run: pytest -vv --browser=${{ matrix.browser }} -n auto
76+
run: pytest -vv --browser=${{ matrix.browser }} -n auto --junitxml=junit/test-results-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.browser }}.xml
77+
- name: Upload pytest test results
78+
uses: actions/upload-artifact@v1
79+
with:
80+
name: pytest-results-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.browser }}.xml
81+
path: junit/test-results-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.browser }}.xml
82+
# Use always() to always run this step to publish test results when there are test failures
83+
if: ${{ always() }}

0 commit comments

Comments
 (0)