File tree Expand file tree Collapse file tree 4 files changed +30
-2
lines changed Expand file tree Collapse file tree 4 files changed +30
-2
lines changed Original file line number Diff line number Diff line change 13
13
buildspec : codebuild/python_37.yml
14
14
- identifier : python_38
15
15
buildspec : codebuild/python_38.yml
16
+
17
+ - identifier : code_coverage
18
+ buildspec : codebuild/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
+ AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID : >-
7
+ arn:aws:kms:us-west-2:658956600833:key/b3537ef1-d8dc-4780-9f5a-55776cbb2f7f
8
+
9
+ phases :
10
+ install :
11
+ runtime-versions :
12
+ python : latest
13
+ build :
14
+ commands :
15
+ - pip install tox
16
+ - 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 = 70
12
13
13
14
[mypy]
14
15
ignore_missing_imports = True
Original file line number Diff line number Diff line change @@ -29,6 +29,10 @@ envlist =
29
29
# test-release :: Builds dist files and uploads to testpypi pypirc profile.
30
30
# release :: Builds dist files and uploads to pypi pypirc profile.
31
31
32
+ # Reporting environments:
33
+ #
34
+ # coverage :: Runs code coverage, failing the build if coverage is below the configured threshold
35
+
32
36
[testenv]
33
37
passenv =
34
38
# Identifies AWS KMS key id to use in integration tests
@@ -49,10 +53,14 @@ deps =
49
53
pytest-cov
50
54
pytest-mock
51
55
commands =
52
- local: pytest --cov aws_encryption_sdk_cli - m local -l test/ {posargs}
53
- integ: pytest --cov aws_encryption_sdk_cli - m integ -l test/ {posargs}
56
+ local: pytest -m local -l test/ {posargs}
57
+ integ: pytest -m integ -l test/ {posargs}
54
58
all: pytest --cov aws_encryption_sdk_cli -l test/ {posargs}
55
59
60
+ # Run code coverage on the unit tests
61
+ [testenv:coverage]
62
+ commands = pytest --cov aws_encryption_sdk test/
63
+
56
64
# mypy
57
65
[testenv:mypy-coverage]
58
66
commands =
You can’t perform that action at this time.
0 commit comments