Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improve make test command #863

Merged
merged 2 commits into from
Jan 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ 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
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- 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
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions test/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pyyaml
flask
six
coverage
codecov
mock