Skip to content

Commit

Permalink
test: test AWS on appveyor
Browse files Browse the repository at this point in the history
Signed-off-by: Ruslan Kuprieiev <[email protected]>
  • Loading branch information
efiop committed Feb 14, 2018
1 parent 25d6410 commit c5530a4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
6 changes: 6 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ branches:
platform: x86

environment:
my_variable:
aws_access_key_id:
secure: N3zfVSEvKhLSg/wvtrT1ZIVl9/egvW6xqIoRDrOcvvrkvJM0VejDHb3R3BWUUftY
aws_secret_access_key:
secure: /XGu3uYneji4fwIaFIEzDln9bx7vWZiLb6yie1temPyIRK+NQlvyfGXHcKZ5Vm4teaG68pNvQKoYulUSem4NvQ==

matrix:

- PYTHON: "C:\\Python27"
Expand Down
17 changes: 9 additions & 8 deletions tests/test_data_cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,15 @@ class TestDataCloudAWS(TestDataCloudBase):
TEST_REPO_REGION = 'us-east-2'

def _should_test(self):
if os.name == 'nt':
dvc_test_aws = os.getenv("DVC_TEST_AWS")
if dvc_test_aws == "true":
return True
elif dvc_test_aws == "false":
return False

if os.getenv("TRAVIS_PULL_REQUEST") == "false" and \
os.getenv("TRAVIS_SECURE_ENV_VARS") == "true":
if os.getenv("AWS_ACCESS_KEY_ID") and os.getenv("AWS_SECRET_ACCESS_KEY"):
return True

return False

def _setup_cloud(self):
Expand All @@ -129,12 +132,10 @@ class TestDataCloudGCP(TestDataCloudBase):
TEST_REPO_GCP_PROJECT='dvc-project'

def _should_test(self):
if os.name == 'nt':
return False
if os.getenv("DVC_TEST_GCP") == "true":
return True

if os.getenv("TRAVIS") == "true" or os.getenv("APPVEYOR") == "True" or os.getenv("DVC_TEST_GCP") != "true":
return False
return True
return False

def _setup_cloud(self):
if not self._should_test():
Expand Down

0 comments on commit c5530a4

Please sign in to comment.