Skip to content

Commit 535060c

Browse files
webknjaznedbat
authored andcommitted
test: only rerun the failed tests in CI
This patch simplifies attempting to execute the tests again on failures in CI. It also limits the scope of the tests being rerun to include only those that failed on the first try. Additionally, it enables the maximum verbosity so that the retry is more useful for troubleshooting.
1 parent 518cdff commit 535060c

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

.github/workflows/testsuite.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -74,23 +74,14 @@ jobs:
7474
# python -c "import urllib.request as r; exec(r.urlopen('https://bit.ly/pydoctor').read())"
7575
7676
- name: "Run tox for ${{ matrix.python-version }}"
77-
continue-on-error: true
78-
id: tox1
7977
run: |
8078
python -m tox -- -rfsEX
8179
8280
- name: "Retry tox for ${{ matrix.python-version }}"
83-
id: tox2
84-
if: steps.tox1.outcome == 'failure'
81+
if: failure()
8582
run: |
86-
python -m tox -- -rfsEX
87-
88-
- name: "Set status"
89-
if: always()
90-
run: |
91-
if ${{ steps.tox1.outcome != 'success' && steps.tox2.outcome != 'success' }}; then
92-
exit 1
93-
fi
83+
# `exit 1` makes sure that the job remains red with flaky runs
84+
python -m tox -- -rfsEX --lf -vvvvv && exit 1
9485
9586
# This job aggregates test results. It's the required check for branch protection.
9687
# https://github.com/marketplace/actions/alls-green#why

0 commit comments

Comments
 (0)