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 57
57
buildspec : codebuild/py38/awses_2.0.0.yml
58
58
- identifier : py38_awses_latest
59
59
buildspec : codebuild/py38/awses_latest.yml
60
+
61
+ - identifier : code_coverage
62
+ 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 = 95
12
13
13
14
[tool:pytest]
14
15
log_level = DEBUG
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 aws_encryption_sdk {posargs}
43
+ commands = pytest --basetemp ={envtmpdir} -l {posargs}
40
44
41
45
[testenv]
42
46
passenv =
@@ -62,6 +66,10 @@ commands =
62
66
all: {[testenv:base-command]commands} test/ examples/test/
63
67
manual: {[testenv:base-command]commands}
64
68
69
+ # Run code coverage on the unit tests
70
+ [testenv:coverage]
71
+ commands = {[testenv:base-command]commands} --cov aws_encryption_sdk test/ -m local
72
+
65
73
# Verify that local tests work without environment variables present
66
74
[testenv:nocmk]
67
75
basepython = python3
You can’t perform that action at this time.
0 commit comments