From 151eca853e1ad823cca671de8db7064efd954ae7 Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Mon, 11 Dec 2023 13:07:44 +0100 Subject: [PATCH 1/3] Retry coverage step on error --- .github/workflows/generate_coverage.yaml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/generate_coverage.yaml b/.github/workflows/generate_coverage.yaml index 9d6b2e511f4..6b957a75b07 100644 --- a/.github/workflows/generate_coverage.yaml +++ b/.github/workflows/generate_coverage.yaml @@ -53,8 +53,19 @@ jobs: conda list - name: Build dpnp with coverage + id: build_coverage + uses: nick-fields/retry@v2.9.0 + with: + max_attempts: 5 + retry_on: error + command: | + python scripts/gen_coverage.py --pytest-opts="--ignore tests/test_random.py" + on_retry_command: | + git clean -fxd + + - name: Total number of coverage attempts run: | - python scripts/gen_coverage.py --pytest-opts="--ignore tests/test_random.py" + echo "Total number of coverage attempts made: ${{ steps.build_coverage.outputs.total_attempts }}" - name: Install coverall dependencies run: | From 7249ffaab1f3937c190c1da762a7c1beeec202da Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Mon, 11 Dec 2023 13:20:54 +0100 Subject: [PATCH 2/3] Added timeout to limit single retry time --- .github/workflows/generate_coverage.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/generate_coverage.yaml b/.github/workflows/generate_coverage.yaml index 6b957a75b07..c0fe5806d18 100644 --- a/.github/workflows/generate_coverage.yaml +++ b/.github/workflows/generate_coverage.yaml @@ -56,6 +56,7 @@ jobs: id: build_coverage uses: nick-fields/retry@v2.9.0 with: + timeout_minutes: 60 max_attempts: 5 retry_on: error command: | From 400e1e4c259106bed33d89072a1db8576a538d5b Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Mon, 11 Dec 2023 13:29:11 +0100 Subject: [PATCH 3/3] Added shell option to the step --- .github/workflows/generate_coverage.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate_coverage.yaml b/.github/workflows/generate_coverage.yaml index c0fe5806d18..a9e92395762 100644 --- a/.github/workflows/generate_coverage.yaml +++ b/.github/workflows/generate_coverage.yaml @@ -56,13 +56,15 @@ jobs: id: build_coverage uses: nick-fields/retry@v2.9.0 with: + shell: bash timeout_minutes: 60 max_attempts: 5 retry_on: error command: | - python scripts/gen_coverage.py --pytest-opts="--ignore tests/test_random.py" - on_retry_command: | + . $CONDA/etc/profile.d/conda.sh + conda activate coverage git clean -fxd + python scripts/gen_coverage.py --pytest-opts="--ignore tests/test_random.py" - name: Total number of coverage attempts run: |