Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-retry tests on failure #2134

Merged
merged 7 commits into from
Jun 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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