Skip to content

Commit 04a06d8

Browse files
authored
fix: improve make test command (#863)
* fix: improve make test testing
1 parent bffb267 commit 04a06d8

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

.travis.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ env:
1515
global:
1616
- CC_TEST_REPORTER_ID=$TRAVIS_CODE_CLIMATE_TOKEN SENDGRID_API_KEY=SGAPIKEY
1717
install:
18-
- python setup.py install
19-
- pip install pyyaml flask six coverage codecov
18+
- make install
19+
- make test-install
2020
before_script:
2121
- "./test/prism.sh &"
2222
- sleep 20
2323
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
2424
- chmod +x ./cc-test-reporter
2525
- ./cc-test-reporter before-build
2626
script:
27-
- coverage run -m unittest discover
27+
- . venv/bin/activate; coverage run -m unittest discover
2828
after_script:
29-
- codecov
29+
- . venv/bin/activate; codecov
3030
- ./cc-test-reporter after-build --exit-code $?
3131
deploy:
3232
provider: pypi

Makefile

+6-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@ install: venv
88
. venv/bin/activate; python setup.py install
99
. venv/bin/activate; pip install -r requirements.txt
1010

11-
test:
11+
test-install:
12+
. venv/bin/activate; pip install -r test/requirements.txt
13+
14+
test: test-install
15+
./test/prism.sh &
16+
sleep 2
1217
. venv/bin/activate; python -m unittest discover -v
1318

1419
clean: nopyc

test/requirements.txt

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pyyaml
2+
flask
3+
six
4+
coverage
5+
codecov
6+
mock

0 commit comments

Comments
 (0)