File tree 3 files changed +26
-2
lines changed
3 files changed +26
-2
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 @@ -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 =
@@ -58,7 +62,6 @@ deps = -rtest/requirements.txt
58
62
download = true
59
63
commands =
60
64
# Only run small test scenario sets
61
- local-fast: {[testenv:base-command]commands} test/ -m " local and not slow and not veryslow and not nope"
62
65
integ-fast: {[testenv:base-command]commands} test/ -m " integ and not ddb_integ and not slow and not veryslow and not nope"
63
66
ddb-fast: {[testenv:base-command]commands} test/ -m " ddb_integ and not slow and not veryslow and not nope"
64
67
all-fast: {[testenv:base-command]commands} test/ -m " not slow and not veryslow and not nope"
@@ -86,6 +89,10 @@ commands =
86
89
# Only run examples tests
87
90
examples: {[testenv:base-command]commands} examples/test/ -m " examples"
88
91
92
+ # Run code coverage on the unit tests
93
+ [testenv:coverage]
94
+ commands = {[testenv:base-command]commands} --cov dynamodb_encryption_sdk test/ -m " local and not slow and not veryslow and not nope"
95
+
89
96
# Verify that local tests work without environment variables present
90
97
[testenv:nocmk]
91
98
basepython = python3
You can’t perform that action at this time.
0 commit comments