Skip to content

Commit 2882ee8

Browse files
authored
Auto-retry tests on failure (#2134)
1 parent b72c1e2 commit 2882ee8

37 files changed

+518
-370
lines changed

.github/workflows/test-common.yml

+14-10
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
test:
2727
name: common, python ${{ matrix.python-version }}, ${{ matrix.os }}
2828
runs-on: ${{ matrix.os }}
29-
timeout-minutes: 45
29+
timeout-minutes: 30
3030

3131
strategy:
3232
fail-fast: false
@@ -49,16 +49,20 @@ jobs:
4949
pip install coverage "tox>=3,<4"
5050
5151
- name: Test common
52-
timeout-minutes: 45
53-
shell: bash
54-
run: |
55-
set -x # print commands that are executed
56-
coverage erase
52+
uses: nick-fields/retry@v2
53+
with:
54+
timeout_minutes: 15
55+
max_attempts: 2
56+
retry_wait_seconds: 5
57+
shell: bash
58+
command: |
59+
set -x # print commands that are executed
60+
coverage erase
5761
58-
# Run tests
59-
./scripts/runtox.sh "py${{ matrix.python-version }}-common" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
60-
coverage combine .coverage*
61-
coverage xml -i
62+
# Run tests
63+
./scripts/runtox.sh "py${{ matrix.python-version }}-common" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch &&
64+
coverage combine .coverage* &&
65+
coverage xml -i
6266
6367
- uses: codecov/codecov-action@v3
6468
with:

.github/workflows/test-integration-aiohttp.yml

+14-10
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
test:
2727
name: aiohttp, python ${{ matrix.python-version }}, ${{ matrix.os }}
2828
runs-on: ${{ matrix.os }}
29-
timeout-minutes: 45
29+
timeout-minutes: 30
3030

3131
strategy:
3232
fail-fast: false
@@ -49,16 +49,20 @@ jobs:
4949
pip install coverage "tox>=3,<4"
5050
5151
- name: Test aiohttp
52-
timeout-minutes: 45
53-
shell: bash
54-
run: |
55-
set -x # print commands that are executed
56-
coverage erase
52+
uses: nick-fields/retry@v2
53+
with:
54+
timeout_minutes: 15
55+
max_attempts: 2
56+
retry_wait_seconds: 5
57+
shell: bash
58+
command: |
59+
set -x # print commands that are executed
60+
coverage erase
5761
58-
# Run tests
59-
./scripts/runtox.sh "py${{ matrix.python-version }}-aiohttp" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
60-
coverage combine .coverage*
61-
coverage xml -i
62+
# Run tests
63+
./scripts/runtox.sh "py${{ matrix.python-version }}-aiohttp" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch &&
64+
coverage combine .coverage* &&
65+
coverage xml -i
6266
6367
- uses: codecov/codecov-action@v3
6468
with:

.github/workflows/test-integration-arq.yml

+14-10
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
test:
2727
name: arq, python ${{ matrix.python-version }}, ${{ matrix.os }}
2828
runs-on: ${{ matrix.os }}
29-
timeout-minutes: 45
29+
timeout-minutes: 30
3030

3131
strategy:
3232
fail-fast: false
@@ -49,16 +49,20 @@ jobs:
4949
pip install coverage "tox>=3,<4"
5050
5151
- name: Test arq
52-
timeout-minutes: 45
53-
shell: bash
54-
run: |
55-
set -x # print commands that are executed
56-
coverage erase
52+
uses: nick-fields/retry@v2
53+
with:
54+
timeout_minutes: 15
55+
max_attempts: 2
56+
retry_wait_seconds: 5
57+
shell: bash
58+
command: |
59+
set -x # print commands that are executed
60+
coverage erase
5761
58-
# Run tests
59-
./scripts/runtox.sh "py${{ matrix.python-version }}-arq" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
60-
coverage combine .coverage*
61-
coverage xml -i
62+
# Run tests
63+
./scripts/runtox.sh "py${{ matrix.python-version }}-arq" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch &&
64+
coverage combine .coverage* &&
65+
coverage xml -i
6266
6367
- uses: codecov/codecov-action@v3
6468
with:

.github/workflows/test-integration-asgi.yml

+14-10
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
test:
2727
name: asgi, python ${{ matrix.python-version }}, ${{ matrix.os }}
2828
runs-on: ${{ matrix.os }}
29-
timeout-minutes: 45
29+
timeout-minutes: 30
3030

3131
strategy:
3232
fail-fast: false
@@ -49,16 +49,20 @@ jobs:
4949
pip install coverage "tox>=3,<4"
5050
5151
- name: Test asgi
52-
timeout-minutes: 45
53-
shell: bash
54-
run: |
55-
set -x # print commands that are executed
56-
coverage erase
52+
uses: nick-fields/retry@v2
53+
with:
54+
timeout_minutes: 15
55+
max_attempts: 2
56+
retry_wait_seconds: 5
57+
shell: bash
58+
command: |
59+
set -x # print commands that are executed
60+
coverage erase
5761
58-
# Run tests
59-
./scripts/runtox.sh "py${{ matrix.python-version }}-asgi" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
60-
coverage combine .coverage*
61-
coverage xml -i
62+
# Run tests
63+
./scripts/runtox.sh "py${{ matrix.python-version }}-asgi" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch &&
64+
coverage combine .coverage* &&
65+
coverage xml -i
6266
6367
- uses: codecov/codecov-action@v3
6468
with:

.github/workflows/test-integration-aws_lambda.yml

+14-10
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
test:
2727
name: aws_lambda, python ${{ matrix.python-version }}, ${{ matrix.os }}
2828
runs-on: ${{ matrix.os }}
29-
timeout-minutes: 45
29+
timeout-minutes: 30
3030

3131
strategy:
3232
fail-fast: false
@@ -49,16 +49,20 @@ jobs:
4949
pip install coverage "tox>=3,<4"
5050
5151
- name: Test aws_lambda
52-
timeout-minutes: 45
53-
shell: bash
54-
run: |
55-
set -x # print commands that are executed
56-
coverage erase
52+
uses: nick-fields/retry@v2
53+
with:
54+
timeout_minutes: 15
55+
max_attempts: 2
56+
retry_wait_seconds: 5
57+
shell: bash
58+
command: |
59+
set -x # print commands that are executed
60+
coverage erase
5761
58-
# Run tests
59-
./scripts/runtox.sh "py${{ matrix.python-version }}-aws_lambda" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
60-
coverage combine .coverage*
61-
coverage xml -i
62+
# Run tests
63+
./scripts/runtox.sh "py${{ matrix.python-version }}-aws_lambda" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch &&
64+
coverage combine .coverage* &&
65+
coverage xml -i
6266
6367
- uses: codecov/codecov-action@v3
6468
with:

.github/workflows/test-integration-beam.yml

+14-10
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
test:
2727
name: beam, python ${{ matrix.python-version }}, ${{ matrix.os }}
2828
runs-on: ${{ matrix.os }}
29-
timeout-minutes: 45
29+
timeout-minutes: 30
3030

3131
strategy:
3232
fail-fast: false
@@ -49,16 +49,20 @@ jobs:
4949
pip install coverage "tox>=3,<4"
5050
5151
- name: Test beam
52-
timeout-minutes: 45
53-
shell: bash
54-
run: |
55-
set -x # print commands that are executed
56-
coverage erase
52+
uses: nick-fields/retry@v2
53+
with:
54+
timeout_minutes: 15
55+
max_attempts: 2
56+
retry_wait_seconds: 5
57+
shell: bash
58+
command: |
59+
set -x # print commands that are executed
60+
coverage erase
5761
58-
# Run tests
59-
./scripts/runtox.sh "py${{ matrix.python-version }}-beam" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
60-
coverage combine .coverage*
61-
coverage xml -i
62+
# Run tests
63+
./scripts/runtox.sh "py${{ matrix.python-version }}-beam" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch &&
64+
coverage combine .coverage* &&
65+
coverage xml -i
6266
6367
- uses: codecov/codecov-action@v3
6468
with:

.github/workflows/test-integration-boto3.yml

+14-10
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
test:
2727
name: boto3, python ${{ matrix.python-version }}, ${{ matrix.os }}
2828
runs-on: ${{ matrix.os }}
29-
timeout-minutes: 45
29+
timeout-minutes: 30
3030

3131
strategy:
3232
fail-fast: false
@@ -49,16 +49,20 @@ jobs:
4949
pip install coverage "tox>=3,<4"
5050
5151
- name: Test boto3
52-
timeout-minutes: 45
53-
shell: bash
54-
run: |
55-
set -x # print commands that are executed
56-
coverage erase
52+
uses: nick-fields/retry@v2
53+
with:
54+
timeout_minutes: 15
55+
max_attempts: 2
56+
retry_wait_seconds: 5
57+
shell: bash
58+
command: |
59+
set -x # print commands that are executed
60+
coverage erase
5761
58-
# Run tests
59-
./scripts/runtox.sh "py${{ matrix.python-version }}-boto3" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
60-
coverage combine .coverage*
61-
coverage xml -i
62+
# Run tests
63+
./scripts/runtox.sh "py${{ matrix.python-version }}-boto3" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch &&
64+
coverage combine .coverage* &&
65+
coverage xml -i
6266
6367
- uses: codecov/codecov-action@v3
6468
with:

.github/workflows/test-integration-bottle.yml

+14-10
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
test:
2727
name: bottle, python ${{ matrix.python-version }}, ${{ matrix.os }}
2828
runs-on: ${{ matrix.os }}
29-
timeout-minutes: 45
29+
timeout-minutes: 30
3030

3131
strategy:
3232
fail-fast: false
@@ -49,16 +49,20 @@ jobs:
4949
pip install coverage "tox>=3,<4"
5050
5151
- name: Test bottle
52-
timeout-minutes: 45
53-
shell: bash
54-
run: |
55-
set -x # print commands that are executed
56-
coverage erase
52+
uses: nick-fields/retry@v2
53+
with:
54+
timeout_minutes: 15
55+
max_attempts: 2
56+
retry_wait_seconds: 5
57+
shell: bash
58+
command: |
59+
set -x # print commands that are executed
60+
coverage erase
5761
58-
# Run tests
59-
./scripts/runtox.sh "py${{ matrix.python-version }}-bottle" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
60-
coverage combine .coverage*
61-
coverage xml -i
62+
# Run tests
63+
./scripts/runtox.sh "py${{ matrix.python-version }}-bottle" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch &&
64+
coverage combine .coverage* &&
65+
coverage xml -i
6266
6367
- uses: codecov/codecov-action@v3
6468
with:

.github/workflows/test-integration-celery.yml

+14-10
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
test:
2727
name: celery, python ${{ matrix.python-version }}, ${{ matrix.os }}
2828
runs-on: ${{ matrix.os }}
29-
timeout-minutes: 45
29+
timeout-minutes: 30
3030

3131
strategy:
3232
fail-fast: false
@@ -49,16 +49,20 @@ jobs:
4949
pip install coverage "tox>=3,<4"
5050
5151
- name: Test celery
52-
timeout-minutes: 45
53-
shell: bash
54-
run: |
55-
set -x # print commands that are executed
56-
coverage erase
52+
uses: nick-fields/retry@v2
53+
with:
54+
timeout_minutes: 15
55+
max_attempts: 2
56+
retry_wait_seconds: 5
57+
shell: bash
58+
command: |
59+
set -x # print commands that are executed
60+
coverage erase
5761
58-
# Run tests
59-
./scripts/runtox.sh "py${{ matrix.python-version }}-celery" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
60-
coverage combine .coverage*
61-
coverage xml -i
62+
# Run tests
63+
./scripts/runtox.sh "py${{ matrix.python-version }}-celery" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch &&
64+
coverage combine .coverage* &&
65+
coverage xml -i
6266
6367
- uses: codecov/codecov-action@v3
6468
with:

.github/workflows/test-integration-chalice.yml

+14-10
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
test:
2727
name: chalice, python ${{ matrix.python-version }}, ${{ matrix.os }}
2828
runs-on: ${{ matrix.os }}
29-
timeout-minutes: 45
29+
timeout-minutes: 30
3030

3131
strategy:
3232
fail-fast: false
@@ -49,16 +49,20 @@ jobs:
4949
pip install coverage "tox>=3,<4"
5050
5151
- name: Test chalice
52-
timeout-minutes: 45
53-
shell: bash
54-
run: |
55-
set -x # print commands that are executed
56-
coverage erase
52+
uses: nick-fields/retry@v2
53+
with:
54+
timeout_minutes: 15
55+
max_attempts: 2
56+
retry_wait_seconds: 5
57+
shell: bash
58+
command: |
59+
set -x # print commands that are executed
60+
coverage erase
5761
58-
# Run tests
59-
./scripts/runtox.sh "py${{ matrix.python-version }}-chalice" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
60-
coverage combine .coverage*
61-
coverage xml -i
62+
# Run tests
63+
./scripts/runtox.sh "py${{ matrix.python-version }}-chalice" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch &&
64+
coverage combine .coverage* &&
65+
coverage xml -i
6266
6367
- uses: codecov/codecov-action@v3
6468
with:

0 commit comments

Comments
 (0)