Skip to content

Commit 851e51a

Browse files
authored
configure for codebuild pr builds (aws#679)
1 parent 0a7a532 commit 851e51a

File tree

6 files changed

+36
-13
lines changed

6 files changed

+36
-13
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: python
22
python:
33
- '2.7'
4-
- '3.5'
4+
- '3.6'
55
install: pip install tox-travis codecov
66
script:
77
- tox tests/unit

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Supported Python Versions
7575
SageMaker Python SDK is tested on:
7676

7777
- Python 2.7
78-
- Python 3.5
78+
- Python 3.6
7979

8080
AWS Permissions
8181
~~~~~~~~~~~~~~~

buildspec.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
version: 0.2
2+
3+
phases:
4+
pre_build:
5+
commands:
6+
- start-dockerd
7+
8+
build:
9+
commands:
10+
# run linters
11+
- tox -e flake8,pylint
12+
13+
# run package and docbuild checks
14+
- tox -e twine
15+
- tox -e sphinx
16+
17+
# run unit tests
18+
- AWS_ACCESS_KEY_ID= AWS_SECRET_ACCESS_KEY= AWS_SESSION_TOKEN=
19+
AWS_CONTAINER_CREDENTIALS_RELATIVE_URI= AWS_DEFAULT_REGION=
20+
tox -e py27,py36 -- tests/unit
21+
22+
# run integration tests
23+
- if-matching-changes "test/" "tests/" "src/*.py" "docker/*/Dockerfile" &&
24+
IGNORE_COVERAGE=- tox -e py27,py36 -- -n 24 --boxed tests/integ

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def read(fname):
5050
"License :: OSI Approved :: Apache Software License",
5151
"Programming Language :: Python",
5252
"Programming Language :: Python :: 2.7",
53-
"Programming Language :: Python :: 3.5",
53+
"Programming Language :: Python :: 3.6",
5454
],
5555

5656
install_requires=required_packages,

tests/integ/kms_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"Sid": "Enable IAM User Permissions",
2323
"Effect": "Allow",
2424
"Principal": {{
25-
"AWS": "arn:aws:iam::{account_id}:root"
25+
"AWS": "{account_id}"
2626
}},
2727
"Action": "kms:*",
2828
"Resource": "*"
@@ -31,7 +31,7 @@
3131
"Sid": "Allow use of the key",
3232
"Effect": "Allow",
3333
"Principal": {{
34-
"AWS": "arn:aws:iam::{account_id}:role/SageMakerRole"
34+
"AWS": "{account_id}"
3535
}},
3636
"Action": [
3737
"kms:Encrypt",
@@ -46,7 +46,7 @@
4646
"Sid": "Allow attachment of persistent resources",
4747
"Effect": "Allow",
4848
"Principal": {{
49-
"AWS": "arn:aws:iam::{account_id}:role/SageMakerRole"
49+
"AWS": "{account_id}"
5050
}},
5151
"Action": [
5252
"kms:CreateGrant",

tox.ini

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,10 @@
44
# and then run "tox" from this directory.
55

66
[tox]
7-
envlist = py27,py35,flake8,pylint,twine,sphinx
7+
envlist = flake8,pylint,twine,sphinx,py27,py36
88

99
skip_missing_interpreters = False
1010

11-
[travis]
12-
python =
13-
3.5: py35, flake8, pylint
1411

1512
[flake8]
1613
max-line-length = 120
@@ -24,7 +21,9 @@ exclude =
2421
tests/data/
2522
venv/
2623
*service_pb2_grpc.py
24+
2725
max-complexity = 10
26+
2827
ignore =
2928
FI10,
3029
FI12,
@@ -46,13 +45,13 @@ ignore =
4645
require-code = True
4746

4847
[testenv]
49-
# TEAMCITY_VERSION environment variable exists during build on Teamcity. teamcity-messages uses it in order to enable
50-
# reporting to TeamCity.
5148
passenv =
52-
TEAMCITY_VERSION
5349
AWS_ACCESS_KEY_ID
5450
AWS_SECRET_ACCESS_KEY
5551
AWS_SESSION_TOKEN
52+
AWS_CONTAINER_CREDENTIALS_RELATIVE_URI
53+
AWS_DEFAULT_REGION
54+
5655
# {posargs} can be passed in by additional arguments specified when invoking tox.
5756
# Can be used to specify which tests to run, e.g.: tox -- -s
5857
commands =

0 commit comments

Comments
 (0)