diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index acc7d5a507..e652072d9a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -299,8 +299,24 @@ jobs: - name: Run flaky MP CPython tests run: | - target/release/rustpython -m test -j 1 ${{ join(matrix.extra_test_args, ' ') }} --slowest --fail-env-changed --timeout 600 -v ${{ env.FLAKY_MP_TESTS }} + for attempt in $(seq 1 5); do + echo "::group::Attempt ${attempt}" + + set +e + target/release/rustpython -m test -j 1 ${{ join(matrix.extra_test_args, ' ') }} --slowest --fail-env-changed --timeout 600 -v ${{ env.FLAKY_MP_TESTS }} + status=$? + set -e + + echo "::endgroup::" + + if [ $status -eq 0 ]; then + exit 0 + fi + done + + exit 1 timeout-minutes: ${{ matrix.timeout }} + shell: bash env: RUSTPYTHON_SKIP_ENV_POLLUTERS: true