File tree 4 files changed +27
-1
lines changed
4 files changed +27
-1
lines changed Original file line number Diff line number Diff line change 13
13
buildspec : codebuild/python3.7.yml
14
14
- identifier : python3_8
15
15
buildspec : codebuild/python3.8.yml
16
+
17
+ - identifier : code_coverage
18
+ buildspec : codebuild/coverage/coverage.yml
Original file line number Diff line number Diff line change
1
+ version : 0.2
2
+
3
+ env :
4
+ variables :
5
+ TOXENV : " coverage"
6
+
7
+ phases :
8
+ install :
9
+ runtime-versions :
10
+ python : latest
11
+ build :
12
+ commands :
13
+ - pip install tox
14
+ - tox
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ branch = True
9
9
10
10
[coverage:report]
11
11
show_missing = True
12
+ fail_under = 90
12
13
13
14
[mypy]
14
15
ignore_missing_imports = True
Original file line number Diff line number Diff line change @@ -35,8 +35,12 @@ envlist =
35
35
# test-release :: Builds dist files and uploads to testpypi pypirc profile.
36
36
# release :: Builds dist files and uploads to pypi pypirc profile.
37
37
38
+ # Reporting environments:
39
+ #
40
+ # coverage :: Runs code coverage, failing the build if coverage is below the configured threshold
41
+
38
42
[testenv:base-command]
39
- commands = pytest --basetemp ={envtmpdir} -l --cov dynamodb_encryption_sdk {posargs}
43
+ commands = pytest --basetemp ={envtmpdir} -l {posargs}
40
44
41
45
[testenv]
42
46
passenv =
@@ -86,6 +90,10 @@ commands =
86
90
# Only run examples tests
87
91
examples: {[testenv:base-command]commands} examples/test/ -m " examples"
88
92
93
+ # Run code coverage on the unit tests
94
+ [testenv:coverage]
95
+ commands = {[testenv:base-command]commands} --cov dynamodb_encryption_sdk test/ -m " local and not slow and not veryslow and not nope"
96
+
89
97
# Verify that local tests work without environment variables present
90
98
[testenv:nocmk]
91
99
basepython = python3
You can’t perform that action at this time.
0 commit comments