From d7c5779d9737c79006ead416c5b8e5b83965f655 Mon Sep 17 00:00:00 2001 From: Elise Shanholtz Date: Thu, 16 Jan 2020 14:38:12 -0800 Subject: [PATCH 1/2] fix: improve make test testing --- .travis.yml | 4 ++-- Makefile | 7 ++++++- test/requirements.txt | 6 ++++++ 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 test/requirements.txt diff --git a/.travis.yml b/.travis.yml index 1cd074fb1..8a2dbeedf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,8 +15,8 @@ env: global: - CC_TEST_REPORTER_ID=$TRAVIS_CODE_CLIMATE_TOKEN SENDGRID_API_KEY=SGAPIKEY install: - - python setup.py install - - pip install pyyaml flask six coverage codecov + - make install + - make test-install before_script: - "./test/prism.sh &" - sleep 20 diff --git a/Makefile b/Makefile index b0595125b..0e275b62b 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,12 @@ install: venv . venv/bin/activate; python setup.py install . venv/bin/activate; pip install -r requirements.txt -test: +test-install: + . venv/bin/activate; pip install -r test/requirements.txt + +test: test-install + ./test/prism.sh & + sleep 2 . venv/bin/activate; python -m unittest discover -v clean: nopyc diff --git a/test/requirements.txt b/test/requirements.txt new file mode 100644 index 000000000..6cb2e96d2 --- /dev/null +++ b/test/requirements.txt @@ -0,0 +1,6 @@ +pyyaml +flask +six +coverage +codecov +mock From e67b94a2a72ca50065720c72da2172f331372739 Mon Sep 17 00:00:00 2001 From: Elise Shanholtz Date: Thu, 16 Jan 2020 14:41:24 -0800 Subject: [PATCH 2/2] activate virtualenv --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8a2dbeedf..6d42ff9ea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,9 +24,9 @@ before_script: - chmod +x ./cc-test-reporter - ./cc-test-reporter before-build script: - - coverage run -m unittest discover + - . venv/bin/activate; coverage run -m unittest discover after_script: - - codecov + - . venv/bin/activate; codecov - ./cc-test-reporter after-build --exit-code $? deploy: provider: pypi