8000 fix(ci): Fix Github action checks (#1780) · getsentry/sentry-python@dd26fbe · GitHub
[go: up one dir, main page]

Skip to content

Commit dd26fbe

Browse files
fix(ci): Fix Github action checks (#1780)
The checks are failing for 2 reasons: 1. GitHub actions dropped python3.7 support on the latest hosted runners. actions/setup-python#544 (comment) 2. New release of Tox was validation the python version in the environment name and the trailing framework version being used in the environment name was being treated as a python version and validated causing an issue. Further changes: * Added one GitHub job to check if all tests have passed. Makes it easier to configure required checks in GitHub. * Pinning Tox to <4 Co-authored-by: Anton Pirker <anton.pirker@sentry.io>
1 parent b1290c6 commit dd26fbe

31 files changed

+715
-347
lines changed

.github/workflows/test-common.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ jobs:
2424
continue-on-error: true
2525
strategy:
2626
matrix:
27-
os: [ubuntu-latest]
27+
# python3.6 reached EOL and is no longer being supported on
28+
# new versions of hosted runners on Github Actions
29+
# ubuntu-20.04 is the last version that supported python3.6
30+
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
31+
os: [ubuntu-20.04]
2832
python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]
2933
services:
3034
postgres:
@@ -51,9 +55,6 @@ jobs:
5155
python-version: ${{ matrix.python-version }}
5256

5357
- name: Setup Test Env
54-
env:
55-
PGHOST: localhost
56-
PGPASSWORD: sentry
5758
run: |
5859
pip install codecov tox
5960
@@ -69,4 +70,4 @@ jobs:
6970
./scripts/runtox.sh "py${{ matrix.python-version }}$" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch --ignore=tests/integrations
7071
coverage combine .coverage*
7172
coverage xml -i
72-
codecov --file coverage.xml
73+
codecov --file coverage.xml

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

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,16 @@ jobs:
2727
name: aiohttp, python ${{ matrix.python-version }}, ${{ matrix.os }}
2828
runs-on: ${{ matrix.os }}
2929
timeout-minutes: 45
30-
continue-on-error: true
3130

3231
strategy:
32+
fail-fast: false
3333
matrix:
3434
python-version: ["3.7","3.8","3.9","3.10"]
35-
os: [ubuntu-latest]
35+
# python3.6 reached EOL and is no longer being supported on
36+
# new versions of hosted runners on Github Actions
37+
# ubuntu-20.04 is the last version that supported python3.6
38+
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
39+
os: [ubuntu-20.04]
3640

3741
steps:
3842
- uses: actions/checkout@v3
@@ -41,11 +45,8 @@ jobs:
4145
python-version: ${{ matrix.python-version }}
4246

4347
- name: Setup Test Env
44-
env:
45-
PGHOST: localhost
46-
PGPASSWORD: sentry
4748
run: |
48-
pip install codecov tox
49+
pip install codecov "tox>=3,<4"
4950
5051
- name: Test aiohttp
5152
env:
@@ -60,3 +61,15 @@ jobs:
6061
coverage combine .coverage*
6162
coverage xml -i
6263
codecov --file coverage.xml
64+
65+
check_required_tests:
66+
name: All aiohttp tests passed or skipped
67+
needs: test
68+
# Always run this, even if a dependent job failed
69+
if: always()
70+
runs-on: ubuntu-20.04
71+
steps:
72+
- name: Check for failures
73+
if: contains(needs.test.result, 'failure')
74+
run: |
75+
echo "One of the dependent jobs have failed. You may need to re-run it." && exit 1

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

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,16 @@ jobs:
2727
name: asgi, python ${{ matrix.python-version }}, ${{ matrix.os }}
2828
runs-on: ${{ matrix.os }}
2929
timeout-minutes: 45
30-
continue-on-error: true
3130

3231
strategy:
32+
fail-fast: false
3333
matrix:
3434
python-version: ["3.7","3.8","3.9","3.10"]
35-
os: [ubuntu-latest]
35+
# python3.6 reached EOL and is no longer being supported on
36+
# new versions of hosted runners on Github Actions
37+
# ubuntu-20.04 is the last version that supported python3.6
38+
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
39+
os: [ubuntu-20.04]
3640

3741
steps:
3842
- uses: actions/checkout@v3
@@ -41,11 +45,8 @@ jobs:
4145
python-version: ${{ matrix.python-version }}
4246

4347
- name: Setup Test Env
44-
env:
45-
PGHOST: localhost
46-
PGPASSWORD: sentry
4748
run: |
48-
pip install codecov tox
49+
pip install codecov "tox>=3,<4"
4950
5051
- name: Test asgi
5152
env:
@@ -60,3 +61,15 @@ jobs:
6061
coverage combine .coverage*
6162
coverage xml -i
6263
codecov --file coverage.xml
64+
65+
check_required_tests:
66+
name: All asgi tests passed or skipped
67+
needs: test
68+
# Always run this, even if a dependent job failed
69+
if: always()
70+
runs-on: ubuntu-20.04
71+
steps:
72+
- name: Check for failures
73+
if: contains(needs.test.result, 'failure')
74+
run: |
75+
echo "One of the dependent jobs have failed. You may need to re-run it." && exit 1

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

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,16 @@ jobs:
2727
name: aws_lambda, python ${{ matrix.python-version }}, ${{ matrix.os }}
2828
runs-on: ${{ matrix.os }}
2929
timeout-minutes: 45
30-
continue-on-error: true
3130

3231
strategy:
32+
fail-fast: false
3333
matrix:
3434
python-version: ["3.7"]
35-
os: [ubuntu-latest]
35+
# python3.6 reached EOL and is no longer being supported on
36+
# new versions of hosted runners on Github Actions
37+
# ubuntu-20.04 is the last version that supported python3.6
38+
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
39+
os: [ubuntu-20.04]
3640

3741
steps:
3842
- uses: actions/checkout@v3
@@ -41,11 +45,8 @@ jobs:
4145
python-version: ${{ matrix.python-version }}
4246

4347
- name: Setup Test Env
44-
env:
45-
PGHOST: localhost
46-
PGPASSWORD: sentry
4748
run: |
48-
pip install codecov tox
49+
pip install codecov "tox>=3,<4"
4950
5051
- name: Test aws_lambda
5152
env:
@@ -60,3 +61,15 @@ jobs:
6061
coverage combine .coverage*
6162
coverage xml -i
6263
codecov --file coverage.xml
64+
65+
check_required_tests:
66+
name: All aws_lambda tests passed or skipped
67+
needs: test
68+
# Always run this, even if a dependent job failed
69+
if: always()
70+
runs-on: ubuntu-20.04
71+
steps:
72+
- name: Check for failures
73+
if: contains(needs.test.result, 'failure')
74+
run: |
75+
echo "One of the dependent jobs have failed. You may need to re-run it." && exit 1

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

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,16 @@ jobs:
2727
name: beam, python ${{ matrix.python-version }}, ${{ matrix.os }}
2828
runs-on: ${{ matrix.os }}
2929
timeout-minutes: 45
30-
continue-on-error: true
3130

3231
strategy:
32+
fail-fast: false
3333
matrix:
3434
python-version: ["3.7"]
35-
os: [ubuntu-latest]
35+
# python3.6 reached EOL and is no longer being supported on
36+
# new versions of hosted runners on Github Actions
37+
# ubuntu-20.04 is the last version that supported python3.6
38+
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
39+
os: [ubuntu-20.04]
3640

3741
steps:
3842
- uses: actions/checkout@v3
@@ -41,11 +45,8 @@ jobs:
4145
python-version: ${{ matrix.python-version }}
4246

4347
- name: Setup Test Env
44-
env:
45-
PGHOST: localhost
46-
PGPASSWORD: sentry
4748
run: |
48-
pip install codecov tox
49+
pip install codecov "tox>=3,<4"
4950
5051
- name: Test beam
5152
env:
@@ -60,3 +61,15 @@ jobs:
6061
coverage combine .coverage*
6162
coverage xml -i
6263
codecov --file coverage.xml
64+
65+
check_required_tests:
66+
name: All beam tests passed or skipped
67+
needs: test
68+
# Always run this, even if a dependent job failed
69+
if: always()
70+
runs-on: ubuntu-20.04
71+
steps:
72+
- name: Check for failures
73+
if: contains(needs.test.result, 'failure')
74+
run: |
75+
echo "One of the dependent jobs have failed. You may need to re-run it." && exit 1

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

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,16 @@ jobs:
2727
name: boto3, python ${{ matrix.python-version }}, ${{ matrix.os }}
2828
runs-on: ${{ matrix.os }}
2929
timeout-minutes: 45
30-
continue-on-error: true
3130

3231
strategy:
32+
fail-fast: false
3333
matrix:
3434
python-version: ["2.7","3.6","3.7","3.8"]
35-
os: [ubuntu-latest]
35+
# python3.6 reached EOL and is no longer being supported on
36+
# new versions of hosted runners on Github Actions
37+
# ubuntu-20.04 is the last version that supported python3.6
38+
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
39+
os: [ubuntu-20.04]
3640

3741
steps:
3842
- uses: actions/checkout@v3
@@ -41,11 +45,8 @@ jobs:
4145
python-version: ${{ matrix.python-version }}
4246

4347
- name: Setup Test Env
44-
env:
45-
PGHOST: localhost
46-
PGPASSWORD: sentry
4748
run: |
48-
pip install codecov tox
49+
pip install codecov "tox>=3,<4"
4950
5051
- name: Test boto3
5152
env:
@@ -60,3 +61,15 @@ jobs:
6061
coverage combine .coverage*
6162
coverage xml -i
6263
codecov --file coverage.xml
64+
65+
check_required_tests:
66+
name: All boto3 tests passed or skipped
67+
needs: test
68+
# Always run this, even if a dependent job failed
69+
if: always()
70+
runs-on: ubuntu-20.04
71+
steps:
72+
- name: Check for failures
73+
if: contains(needs.test.result, 'failure')
74+
run: |
75+
echo "One of the dependent jobs have failed. You may need to re-run it." && exit 1

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

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,16 @@ jobs:
2727
name: bottle, python ${{ matrix.python-version }}, ${{ matrix.os }}
2828
runs-on: ${{ matrix.os }}
2929
timeout-minutes: 45
30-
continue-on-error: true
3130

3231
strategy:
32+
fail-fast: false
3333
matrix:
3434
python-version: ["2.7","3.5","3.6","3.7","3.8","3.9","3.10"]
35-
os: [ubuntu-latest]
35+
# python3.6 reached EOL and is no longer being supported on
36+
# new versions of hosted runners on Github Actions
37+
# ubuntu-20.04 is the last version that supported python3.6
38+
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
39+
os: [ubuntu-20.04]
3640

3741
steps:
3842
- uses: actions/checkout@v3
@@ -41,11 +45,8 @@ jobs:
4145
python-version: ${{ matrix.python-version }}
4246

4347
- name: Setup Test Env
44-
env:
45-
PGHOST: localhost
46-
PGPASSWORD: sentry
4748
run: |
48-
pip install codecov tox
49+
pip install codecov "tox>=3,<4"
4950
5051
- name: Test bottle
5152
env:
@@ -60,3 +61,15 @@ jobs:
6061
coverage combine .coverage*
6162
coverage xml -i
6263
codecov --file coverage.xml
64+
65+
check_required_tests:
66+
name: All bottle tests passed or skipped
67+
needs: test
68+
# Always run this, even if a dependent job failed
69+
if: always()
70+
runs-on: ubuntu-20.04
71+
steps:
72+
- name: Check for failures
73+
if: contains(needs.test.result, 'failure')
74+
run: |
75+
echo "One of the dependent jobs have failed. You may need to re-run it." && exit 1

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

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,16 @@ jobs:
2727
name: celery, python ${{ matrix.python-version }}, ${{ matrix.os }}
2828
runs-on: ${{ matrix.os }}
2929
timeout-minutes: 45
30-
continue-on-error: true
3130

3231
strategy:
32+
fail-fast: false
3333
matrix:
3434
python-version: ["2.7","3.5","3.6","3.7","3.8","3.9","3.10"]
35-
os: [ubuntu-latest]
35+
# python3.6 reached EOL and is no longer being supported on
36+
# new versions of hosted runners on Github Actions
37+
# ubuntu-20.04 is the last version that supported python3.6
38+
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
39+
os: [ubuntu-20.04]
3640

3741
steps:
3842
- uses: actions/checkout@v3
@@ -41,11 +45,8 @@ jobs:
4145
python-version: ${{ matrix.python-version }}
4246

4347
- name: Setup Test Env
44-
env:
45-
PGHOST: localhost
46-
PGPASSWORD: sentry
4748
run: |
48-
pip install codecov tox
49+
pip install codecov "tox>=3,<4"
4950
5051
- name: Test celery
5152
env:
@@ -60,3 +61,15 @@ jobs:
6061
coverage combine .coverage*
6162
coverage xml -i
6263
codecov --file coverage.xml
64+
65+
check_required_tests:
66+
name: All celery tests passed or skipped
67+
needs: test
68+
# Always run this, even if a dependent job failed
69+
if: always()
70+
runs-on: ubuntu-20.04
71+
steps:
72+
- name: Check for failures
73+
if: contains(needs.test.result, 'failure')
74+
run: |
75+
echo "One of the dependent jobs have failed. You may need to re-run it." && exit 1

0 commit comments

Comments
 (0)
0