Skip to content

Commit

Permalink
Auto-retry tests on failure (#2134)
Browse files Browse the repository at this point in the history
  • Loading branch information
sentrivana authored Jun 2, 2023
1 parent b72c1e2 commit 2882ee8
Show file tree
Hide file tree
Showing 37 changed files with 518 additions and 370 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/test-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
test:
name: common, python ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 45
timeout-minutes: 30

strategy:
fail-fast: false
Expand All @@ -49,16 +49,20 @@ jobs:
pip install coverage "tox>=3,<4"
- name: Test common
timeout-minutes: 45
shell: bash
run: |
set -x # print commands that are executed
coverage erase
uses: nick-fields/retry@v2
with:
timeout_minutes: 15
max_attempts: 2
retry_wait_seconds: 5
shell: bash
command: |
set -x # print commands that are executed
coverage erase
# Run tests
./scripts/runtox.sh "py${{ matrix.python-version }}-common" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
coverage combine .coverage*
coverage xml -i
# Run tests
./scripts/runtox.sh "py${{ matrix.python-version }}-common" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch &&
coverage combine .coverage* &&
coverage xml -i
- uses: codecov/codecov-action@v3
with:
Expand Down
24 changes: 14 additions & 10 deletions .github/workflows/test-integration-aiohttp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
test:
name: aiohttp, python ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 45
timeout-minutes: 30

strategy:
fail-fast: false
Expand All @@ -49,16 +49,20 @@ jobs:
pip install coverage "tox>=3,<4"
- name: Test aiohttp
timeout-minutes: 45
shell: bash
run: |
set -x # print commands that are executed
coverage erase
uses: nick-fields/retry@v2
with:
timeout_minutes: 15
max_attempts: 2
retry_wait_seconds: 5
shell: bash
command: |
set -x # print commands that are executed
coverage erase
# Run tests
./scripts/runtox.sh "py${{ matrix.python-version }}-aiohttp" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
coverage combine .coverage*
coverage xml -i
# Run tests
./scripts/runtox.sh "py${{ matrix.python-version }}-aiohttp" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch &&
coverage combine .coverage* &&
coverage xml -i
- uses: codecov/codecov-action@v3
with:
Expand Down
24 changes: 14 additions & 10 deletions .github/workflows/test-integration-arq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
test:
name: arq, python ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 45
timeout-minutes: 30

strategy:
fail-fast: false
Expand All @@ -49,16 +49,20 @@ jobs:
pip install coverage "tox>=3,<4"
- name: Test arq
timeout-minutes: 45
shell: bash
run: |
set -x # print commands that are executed
coverage erase
uses: nick-fields/retry@v2
with:
timeout_minutes: 15
max_attempts: 2
retry_wait_seconds: 5
shell: bash
command: |
set -x # print commands that are executed
coverage erase
# Run tests
./scripts/runtox.sh "py${{ matrix.python-version }}-arq" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
coverage combine .coverage*
coverage xml -i
# Run tests
./scripts/runtox.sh "py${{ matrix.python-version }}-arq" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch &&
coverage combine .coverage* &&
coverage xml -i
- uses: codecov/codecov-action@v3
with:
Expand Down
24 changes: 14 additions & 10 deletions .github/workflows/test-integration-asgi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
test:
name: asgi, python ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 45
timeout-minutes: 30

strategy:
fail-fast: false
Expand All @@ -49,16 +49,20 @@ jobs:
pip install coverage "tox>=3,<4"
- name: Test asgi
timeout-minutes: 45
shell: bash
run: |
set -x # print commands that are executed
coverage erase
uses: nick-fields/retry@v2
with:
timeout_minutes: 15
max_attempts: 2
retry_wait_seconds: 5
shell: bash
command: |
set -x # print commands that are executed
coverage erase
# Run tests
./scripts/runtox.sh "py${{ matrix.python-version }}-asgi" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
coverage combine .coverage*
coverage xml -i
# Run tests
./scripts/runtox.sh "py${{ matrix.python-version }}-asgi" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch &&
coverage combine .coverage* &&
coverage xml -i
- uses: codecov/codecov-action@v3
with:
Expand Down
24 changes: 14 additions & 10 deletions .github/workflows/test-integration-aws_lambda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
test:
name: aws_lambda, python ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 45
timeout-minutes: 30

strategy:
fail-fast: false
Expand All @@ -49,16 +49,20 @@ jobs:
pip install coverage "tox>=3,<4"
- name: Test aws_lambda
timeout-minutes: 45
shell: bash
run: |
set -x # print commands that are executed
coverage erase
uses: nick-fields/retry@v2
with:
timeout_minutes: 15
max_attempts: 2
retry_wait_seconds: 5
shell: bash
command: |
set -x # print commands that are executed
coverage erase
# Run tests
./scripts/runtox.sh "py${{ matrix.python-version }}-aws_lambda" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
coverage combine .coverage*
coverage xml -i
# Run tests
./scripts/runtox.sh "py${{ matrix.python-version }}-aws_lambda" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch &&
coverage combine .coverage* &&
coverage xml -i
- uses: codecov/codecov-action@v3
with:
Expand Down
24 changes: 14 additions & 10 deletions .github/workflows/test-integration-beam.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
test:
name: beam, python ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 45
timeout-minutes: 30

strategy:
fail-fast: false
Expand All @@ -49,16 +49,20 @@ jobs:
pip install coverage "tox>=3,<4"
- name: Test beam
timeout-minutes: 45
shell: bash
run: |
set -x # print commands that are executed
coverage erase
uses: nick-fields/retry@v2
with:
timeout_minutes: 15
max_attempts: 2
retry_wait_seconds: 5
shell: bash
command: |
set -x # print commands that are executed
coverage erase
# Run tests
./scripts/runtox.sh "py${{ matrix.python-version }}-beam" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
coverage combine .coverage*
coverage xml -i
# Run tests
./scripts/runtox.sh "py${{ matrix.python-version }}-beam" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch &&
coverage combine .coverage* &&
coverage xml -i
- uses: codecov/codecov-action@v3
with:
Expand Down
24 changes: 14 additions & 10 deletions .github/workflows/test-integration-boto3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
test:
name: boto3, python ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 45
timeout-minutes: 30

strategy:
fail-fast: false
Expand All @@ -49,16 +49,20 @@ jobs:
pip install coverage "tox>=3,<4"
- name: Test boto3
timeout-minutes: 45
shell: bash
run: |
set -x # print commands that are executed
coverage erase
uses: nick-fields/retry@v2
with:
timeout_minutes: 15
max_attempts: 2
retry_wait_seconds: 5
shell: bash
command: |
set -x # print commands that are executed
coverage erase
# Run tests
./scripts/runtox.sh "py${{ matrix.python-version }}-boto3" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
coverage combine .coverage*
coverage xml -i
# Run tests
./scripts/runtox.sh "py${{ matrix.python-version }}-boto3" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch &&
coverage combine .coverage* &&
coverage xml -i
- uses: codecov/codecov-action@v3
with:
Expand Down
24 changes: 14 additions & 10 deletions .github/workflows/test-integration-bottle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
test:
name: bottle, python ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 45
timeout-minutes: 30

strategy:
fail-fast: false
Expand All @@ -49,16 +49,20 @@ jobs:
pip install coverage "tox>=3,<4"
- name: Test bottle
timeout-minutes: 45
shell: bash
run: |
set -x # print commands that are executed
coverage erase
uses: nick-fields/retry@v2
with:
timeout_minutes: 15
max_attempts: 2
retry_wait_seconds: 5
shell: bash
command: |
set -x # print commands that are executed
coverage erase
# Run tests
./scripts/runtox.sh "py${{ matrix.python-version }}-bottle" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
coverage combine .coverage*
coverage xml -i
# Run tests
./scripts/runtox.sh "py${{ matrix.python-version }}-bottle" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch &&
coverage combine .coverage* &&
coverage xml -i
- uses: codecov/codecov-action@v3
with:
Expand Down
24 changes: 14 additions & 10 deletions .github/workflows/test-integration-celery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
test:
name: celery, python ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 45
timeout-minutes: 30

strategy:
fail-fast: false
Expand All @@ -49,16 +49,20 @@ jobs:
pip install coverage "tox>=3,<4"
- name: Test celery
timeout-minutes: 45
shell: bash
run: |
set -x # print commands that are executed
coverage erase
uses: nick-fields/retry@v2
with:
timeout_minutes: 15
max_attempts: 2
retry_wait_seconds: 5
shell: bash
command: |
set -x # print commands that are executed
coverage erase
# Run tests
./scripts/runtox.sh "py${{ matrix.python-version }}-celery" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
coverage combine .coverage*
coverage xml -i
# Run tests
./scripts/runtox.sh "py${{ matrix.python-version }}-celery" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch &&
coverage combine .coverage* &&
coverage xml -i
- uses: codecov/codecov-action@v3
with:
Expand Down
24 changes: 14 additions & 10 deletions .github/workflows/test-integration-chalice.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
test:
name: chalice, python ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 45
timeout-minutes: 30

strategy:
fail-fast: false
Expand All @@ -49,16 +49,20 @@ jobs:
pip install coverage "tox>=3,<4"
- name: Test chalice
timeout-minutes: 45
shell: bash
run: |
set -x # print commands that are executed
coverage erase
uses: nick-fields/retry@v2
with:
timeout_minutes: 15
max_attempts: 2
retry_wait_seconds: 5
shell: bash
command: |
set -x # print commands that are executed
coverage erase
# Run tests
./scripts/runtox.sh "py${{ matrix.python-version }}-chalice" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
coverage combine .coverage*
coverage xml -i
# Run tests
./scripts/runtox.sh "py${{ matrix.python-version }}-chalice" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch &&
coverage combine .coverage* &&
coverage xml -i
- uses: codecov/codecov-action@v3
with:
Expand Down
Loading

0 comments on commit 2882ee8

Please sign in to comment.