1- name : Test Common
1+ name : Test common
22
33on :
44 push :
88
99 pull_request :
1010
11+ # Cancel in progress workflows on pull_requests.
12+ # https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
13+ concurrency :
14+ group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
15+ cancel-in-progress : true
16+
1117permissions :
1218 contents : read
1319
1824
1925jobs :
2026 test :
21- name : Test Python ${{ matrix.python-version }}, ${{ matrix.os }}
27+ name : common, python ${{ matrix.python-version }}, ${{ matrix.os }}
2228 runs-on : ${{ matrix.os }}
2329 timeout-minutes : 45
24- continue-on-error : true
30+
2531 strategy :
32+ fail-fast : false
2633 matrix :
34+ python-version : ["2.7","3.5","3.6","3.7","3.8","3.9","3.10","3.11"]
2735 # python3.6 reached EOL and is no longer being supported on
2836 # new versions of hosted runners on Github Actions
2937 # ubuntu-20.04 is the last version that supported python3.6
3038 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
3139 os : [ubuntu-20.04]
32- python-version : ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
40+
3341 steps :
3442 - uses : actions/checkout@v3
3543 - uses : actions/setup-python@v4
@@ -38,16 +46,28 @@ jobs:
3846
3947 - name : Setup Test Env
4048 run : |
41- pip install codecov tox
49+ pip install codecov " tox>=3,<4"
4250
43- - name : Run Tests
51+ - name : Test common
4452 timeout-minutes : 45
4553 shell : bash
4654 run : |
4755 set -x # print commands that are executed
4856 coverage erase
4957
50- ./scripts/runtox.sh "py${{ matrix.python-version }}$ " --cov=tests --cov=sentry_sdk --cov-report= --cov-branch --ignore=tests/integrations
58+ ./scripts/runtox.sh "py${{ matrix.python-version }}-common " --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
5159 coverage combine .coverage*
5260 coverage xml -i
5361 codecov --file coverage.xml
62+
63+ check_required_tests :
64+ name : All common tests passed or skipped
65+ needs : test
66+ # Always run this, even if a dependent job failed
67+ if : always()
68+ runs-on : ubuntu-20.04
69+ steps :
70+ - name : Check for failures
71+ if : contains(needs.test.result, 'failure')
72+ run : |
73+ echo "One of the dependent jobs have failed. You may need to re-run it." && exit 1
0 commit comments