1
- name : Test Common
1
+ name : Test common
2
2
3
3
on :
4
4
push :
8
8
9
9
pull_request :
10
10
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
+
11
17
permissions :
12
18
contents : read
13
19
18
24
19
25
jobs :
20
26
test :
21
- name : Test Python ${{ matrix.python-version }}, ${{ matrix.os }}
27
+ name : common, python ${{ matrix.python-version }}, ${{ matrix.os }}
22
28
runs-on : ${{ matrix.os }}
23
29
timeout-minutes : 45
24
- continue-on-error : true
30
+
25
31
strategy :
32
+ fail-fast : false
26
33
matrix :
34
+ python-version : ["2.7","3.5","3.6","3.7","3.8","3.9","3.10","3.11"]
27
35
# python3.6 reached EOL and is no longer being supported on
28
36
# new versions of hosted runners on Github Actions
29
37
# ubuntu-20.04 is the last version that supported python3.6
30
38
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
31
39
os : [ubuntu-20.04]
32
- python-version : ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
40
+
33
41
steps :
34
42
- uses : actions/checkout@v3
35
43
- uses : actions/setup-python@v4
@@ -38,16 +46,28 @@ jobs:
38
46
39
47
- name : Setup Test Env
40
48
run : |
41
- pip install codecov tox
49
+ pip install codecov " tox>=3,<4"
42
50
43
- - name : Run Tests
51
+ - name : Test common
44
52
timeout-minutes : 45
45
53
shell : bash
46
54
run : |
47
55
set -x # print commands that are executed
48
56
coverage erase
49
57
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
51
59
coverage combine .coverage*
52
60
coverage xml -i
53
61
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