From 10b2f67dc55d2886adf2286f320e13223a23fbed Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 28 Nov 2020 08:02:59 -0500 Subject: Retry tox if it fails, to avoid flaky failures --- .github/workflows/testsuite.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to '.github/workflows') 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 -- cgit v1.2.1