summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorSviatoslav Sydorenko <wk@sydorenko.org.ua>2022-12-01 17:47:14 +0100
committerNed Batchelder <ned@nedbatchelder.com>2022-12-02 20:56:23 -0500
commit535060c95b606f0c043e02a4688b4bda6f162996 (patch)
treeb2fdc19a6ad1dee123c99cea1930838b7891c7e6 /.github
parent518cdff5bf3467702fa691f833be3b37eef326a0 (diff)
downloadpython-coveragepy-git-535060c95b606f0c043e02a4688b4bda6f162996.tar.gz
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.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/testsuite.yml15
1 files changed, 3 insertions, 12 deletions
diff --git a/.github/workflows/testsuite.yml b/.github/workflows/testsuite.yml
index f343d383..30b83856 100644
--- a/.github/workflows/testsuite.yml
+++ b/.github/workflows/testsuite.yml
@@ -74,23 +74,14 @@ jobs:
# python -c "import urllib.request as r; exec(r.urlopen('https://bit.ly/pydoctor').read())"
- name: "Run tox for ${{ matrix.python-version }}"
- continue-on-error: true
- id: tox1
run: |
python -m tox -- -rfsEX
- name: "Retry tox for ${{ matrix.python-version }}"
- id: tox2
- if: steps.tox1.outcome == 'failure'
+ if: failure()
run: |
- python -m tox -- -rfsEX
-
- - name: "Set status"
- if: always()
- run: |
- if ${{ steps.tox1.outcome != 'success' && steps.tox2.outcome != 'success' }}; then
- exit 1
- fi
+ # `exit 1` makes sure that the job remains red with flaky runs
+ python -m tox -- -rfsEX --lf -vvvvv && exit 1
# This job aggregates test results. It's the required check for branch protection.
# https://github.com/marketplace/actions/alls-green#why