Run the unit tests in CI

This commit is contained in:
Joe Rickerby
2017-09-01 13:32:34 +01:00
parent 5ae4da631f
commit 9091533fcc
4 changed files with 11 additions and 3 deletions
+2 -2
View File
@@ -8,10 +8,10 @@ matrix:
script: script:
- | - |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
pip install . pip install -r requirements-dev.txt
python ./bin/run_tests.py python ./bin/run_tests.py
else else
# linux test requires root to clean up the wheelhouse (docker runs as root) # linux test requires root to clean up the wheelhouse (docker runs as root)
sudo pip install . sudo pip install -r requirements-dev.txt
sudo python ./bin/run_tests.py sudo python ./bin/run_tests.py
fi fi
+1 -1
View File
@@ -1,3 +1,3 @@
build_script: build_script:
- pip install . - pip install -r requirements-dev.txt
- python ./bin/run_tests.py - python ./bin/run_tests.py
+6
View File
@@ -7,6 +7,12 @@ from glob import glob
# move cwd to the project root # move cwd to the project root
os.chdir(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) os.chdir(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
### run the unit tests
subprocess.check_call(['python', '-m', 'pytest', 'unit_test'])
### run the integration tests
test_projects = glob('test/??_*') test_projects = glob('test/??_*')
if len(test_projects) == 0: if len(test_projects) == 0:
+2
View File
@@ -0,0 +1,2 @@
-e .
pytest