Skip to content

Commit 10b2f67

Browse files
committed
Retry tox if it fails, to avoid flaky failures
1 parent 25ee95f commit 10b2f67

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

.github/workflows/testsuite.yml

+20-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,26 @@ jobs:
4444
python -m site
4545
python -m pip install -r requirements/ci.pip
4646
47-
- name: "Run tox targets for ${{ matrix.python-version }}"
47+
- name: "Run tox for ${{ matrix.python-version }}"
4848
shell: bash
49+
continue-on-error: true
50+
id: tox1
4951
run: |
5052
python -m tox
53+
54+
- name: "Retry tox for ${{ matrix.python-version }}"
55+
shell: bash
56+
id: tox2
57+
if: steps.tox1.outcome == 'failure'
58+
run: |
59+
python -m tox
60+
61+
- name: "Set status"
62+
shell: bash
63+
if: always()
64+
run: |
65+
if ${{ steps.tox1.outcome == 'success' || steps.tox2.outcome == 'success' }}; then
66+
echo success
67+
else
68+
exit 1
69+
fi

0 commit comments

Comments
 (0)