summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Poignant <oliver@poignant.se>2016-05-08 01:32:49 +0200
committerOliver Poignant <oliver@poignant.se>2016-05-08 01:32:49 +0200
commitfe94885c120e1b0e6430af4a9bf7dd5a960ae5cd (patch)
tree594129288fe687e56225a527856fed7a1244f729
parent6e6fd2e4f13cfb827ae1f5a0c3e83f14cc1fa15a (diff)
downloadGit-Auto-Deploy-fe94885c120e1b0e6430af4a9bf7dd5a960ae5cd.zip
Git-Auto-Deploy-fe94885c120e1b0e6430af4a9bf7dd5a960ae5cd.tar.gz
Git-Auto-Deploy-fe94885c120e1b0e6430af4a9bf7dd5a960ae5cd.tar.bz2
Adding travis file
-rw-r--r--.travis.yml14
-rw-r--r--test/test_parsers.py1
-rw-r--r--test/utils.py11
3 files changed, 23 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..2dce7e1
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,14 @@
+language: python
+python:
+ - "2.6"
+ - "2.7"
+ - "3.2"
+ - "3.3"
+ - "3.4"
+ - "3.5"
+ - "3.5-dev" # 3.5 development branch
+ - "nightly" # currently points to 3.6-dev
+# command to install dependencies
+install: "pip install -r requirements.txt"
+# command to run tests
+script: python test/test_parses.py
diff --git a/test/test_parsers.py b/test/test_parsers.py
index a5ba65f..885ab79 100644
--- a/test/test_parsers.py
+++ b/test/test_parsers.py
@@ -23,7 +23,6 @@ class WebhookTestCase(WebhookTestCaseBase):
'intercept-stdout': False,
'detailed-response': True,
'log-level': 'WARNING',
- 'log-test-case': True,
'repositories': []
}
diff --git a/test/utils.py b/test/utils.py
index a686485..30eeff6 100644
--- a/test/utils.py
+++ b/test/utils.py
@@ -14,7 +14,11 @@ class WebhookTestCaseBase(unittest.TestCase):
def start_gad(self, test_config):
import sys
import time
- sys.path.insert(1, '..')
+ import os
+
+ # Add repo root to sys path
+ repo_root = os.path.realpath(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..'))
+ sys.path.insert(1, repo_root)
from gitautodeploy.cli.config import get_config_defaults, init_config
@@ -69,9 +73,12 @@ class StubImporter(object):
"""Load matching module from stubs package (test stub) instead of main gitautodeploy package."""
import imp
import sys
+ import os
+
+ repo_root = os.path.realpath(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..'))
module_name = full_name.split('.')[-1]
- module_info = imp.find_module(module_name, ['stubs'])
+ module_info = imp.find_module(module_name, [repo_root+'/test/stubs'])
module = imp.load_module(module_name, *module_info)
sys.modules[module_name] = module