File tree Expand file tree Collapse file tree 3 files changed +26
-32
lines changed Expand file tree Collapse file tree 3 files changed +26
-32
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ commands:
1717 circleci step halt
1818 fi
1919jobs :
20- build :
20+ test :
2121 docker :
2222 - image : circleci/python:3.6.1
2323
@@ -28,53 +28,41 @@ jobs:
2828 steps :
2929 - checkout
3030
31- # Download and cache dependencies
32- - restore_cache :
33- keys :
34- - v1-dependencies-{{ checksum "requirements.txt" }}
35- # fallback to using the latest cache if no exact match is found
36- - v1-dependencies-
31+ - run :
32+ name : Install tox
33+ command : pip install tox
3734
3835 - run :
39- name : install dependencies
40- command : |
41- python -m venv venv
42- . venv/bin/activate
43- pip install -r requirements.txt
44- pip install codecov
36+ name : Test package build
37+ command : tox -e sdist
4538
46- - save_cache :
47- paths :
48- - ./venv
49- key : v1-dependencies-{{ checksum "requirements.txt" }}
39+ - run :
40+ name : Run code styles
41+ command : tox -e pep8
5042
5143 - run :
52- name : test dist
53- command : python setup.py sdist
44+ name : Run unittest with coverage
45+ command : tox -e cover
5446
5547 - run :
56- name : run tests
57- command : |
58- . venv/bin/activate
59- coverage run tests/functional/test_all.py
48+ name : Run functional tests
49+ command : tox -e func
6050
6151 - early_return_for_forked_pull_requests
6252
6353 - run :
6454 name : codecove
6555 command : |
66- . venv/bin/activate
67- codecov
56+ . .tox/func/bin/activate
57+ codecov --file .tox/cover/report/coverage.xml --name ${CODECOV_NAME}-unittests
58+ codecov --file .tox/func/report/coverage.xml --name ${CODECOV_NAME}-functional
6859
69- # - store_artifacts:
70- # path: test-reports
71- # destination: test-reports
7260
7361workflows :
7462 version : 2
7563 commit :
7664 jobs :
77- - build
65+ - test
7866 nightly :
7967 triggers :
8068 - schedule :
@@ -84,4 +72,4 @@ workflows:
8472 only :
8573 - master
8674 jobs :
87- - build
75+ - test
Original file line number Diff line number Diff line change @@ -6,3 +6,5 @@ pytest-html
66
77testtools>=1.4.0
88mock
9+
10+ codecov
Original file line number Diff line number Diff line change @@ -32,14 +32,18 @@ basepython = python3.7
3232basepython = python3.8
3333
3434[testenv:cover]
35- commands = py.test --cov =redisgraph tests/unit/ --cov-report =html:{envdir}/report/
35+ commands = py.test --cov =redisgraph tests/unit/ --cov-report =xml:{envdir}/report/coverage.xml -- cov-report = html:{envdir}/report/html
3636
3737[testenv:func]
38- commands = py.test --cov =redisgraph tests/functional/ --cov-report =html:{envdir}/report/
38+ commands = py.test --cov =redisgraph tests/functional/ --cov-report =xml:{envdir}/report/coverage.xml -- cov-report = html:{envdir}/report/html
3939
4040[testenv:venv]
4141commands = {posargs}
4242
43+ [testenv:sdist]
44+ deps =
45+ commands = python setup.py sdist
46+
4347[flake8]
4448show-source = true
4549# TODO(boris-42): Enable E226 and E501 rules
You can’t perform that action at this time.
0 commit comments