From 9091533fccc635d0153f4989f7292c98fbee746b Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Fri, 1 Sep 2017 13:32:34 +0100 Subject: [PATCH] Run the unit tests in CI --- .travis.yml | 4 ++-- appveyor.yml | 2 +- bin/run_tests.py | 6 ++++++ requirements-dev.txt | 2 ++ 4 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 requirements-dev.txt diff --git a/.travis.yml b/.travis.yml index 3e5ea3f2..effe4142 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,10 +8,10 @@ matrix: script: - | if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - pip install . + pip install -r requirements-dev.txt python ./bin/run_tests.py else # 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 fi diff --git a/appveyor.yml b/appveyor.yml index 93560bed..e75f0975 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,3 +1,3 @@ build_script: - - pip install . + - pip install -r requirements-dev.txt - python ./bin/run_tests.py diff --git a/bin/run_tests.py b/bin/run_tests.py index 748591bf..2c8504af 100755 --- a/bin/run_tests.py +++ b/bin/run_tests.py @@ -7,6 +7,12 @@ from glob import glob # move cwd to the project root 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/??_*') if len(test_projects) == 0: diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 00000000..ae60ed5f --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,2 @@ +-e . +pytest