summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2020-11-28 08:02:59 -0500
committerNed Batchelder <ned@nedbatchelder.com>2020-11-28 19:48:31 -0500
commit10b2f67dc55d2886adf2286f320e13223a23fbed (patch)
tree07a7c7d483faaff17f3155732780a87920c95b54
parent25ee95fef684685dd040130a4d4d24b7178bc678 (diff)
downloadpython-coveragepy-git-10b2f67dc55d2886adf2286f320e13223a23fbed.tar.gz
Retry tox if it fails, to avoid flaky failures
-rw-r--r--.github/workflows/testsuite.yml21
1 files changed, 20 insertions, 1 deletions
diff --git a/.github/workflows/testsuite.yml b/.github/workflows/testsuite.yml
index b59e08d9..62de408a 100644
--- a/.github/workflows/testsuite.yml
+++ b/.github/workflows/testsuite.yml
@@ -44,7 +44,26 @@ jobs:
python -m site
python -m pip install -r requirements/ci.pip
- - name: "Run tox targets for ${{ matrix.python-version }}"
+ - name: "Run tox for ${{ matrix.python-version }}"
shell: bash
+ continue-on-error: true
+ id: tox1
run: |
python -m tox
+
+ - name: "Retry tox for ${{ matrix.python-version }}"
+ shell: bash
+ id: tox2
+ if: steps.tox1.outcome == 'failure'
+ run: |
+ python -m tox
+
+ - name: "Set status"
+ shell: bash
+ if: always()
+ run: |
+ if ${{ steps.tox1.outcome == 'success' || steps.tox2.outcome == 'success' }}; then
+ echo success
+ else
+ exit 1
+ fi