Skip to content
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
48 changes: 18 additions & 30 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ commands:
circleci step halt
fi
jobs:
build:
test:
docker:
- image: circleci/python:3.6.1

Expand All @@ -28,53 +28,41 @@ jobs:
steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "requirements.txt" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run:
name: Install tox
command: pip install tox

- run:
name: install dependencies
command: |
python -m venv venv
. venv/bin/activate
pip install -r requirements.txt
pip install codecov
name: Test package build
command: tox -e sdist

- save_cache:
paths:
- ./venv
key: v1-dependencies-{{ checksum "requirements.txt" }}
- run:
name: Run code styles
command: tox -e pep8

- run:
name: test dist
command: python setup.py sdist
name: Run unittest with coverage
command: tox -e cover

- run:
name: run tests
command: |
. venv/bin/activate
coverage run tests/functional/test_all.py
name: Run functional tests
command: tox -e func

- early_return_for_forked_pull_requests

- run:
name: codecove
command: |
. venv/bin/activate
codecov
. .tox/func/bin/activate
codecov --file .tox/cover/report/coverage.xml --name ${CODECOV_NAME}-unittests
codecov --file .tox/func/report/coverage.xml --name ${CODECOV_NAME}-functional

# - store_artifacts:
# path: test-reports
# destination: test-reports

workflows:
version: 2
commit:
jobs:
- build
- test
nightly:
triggers:
- schedule:
Expand All @@ -84,4 +72,4 @@ workflows:
only:
- master
jobs:
- build
- test
2 changes: 2 additions & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ pytest-html

testtools>=1.4.0
mock

codecov
8 changes: 6 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,18 @@ basepython = python3.7
basepython = python3.8

[testenv:cover]
commands = py.test --cov=redisgraph tests/unit/ --cov-report=html:{envdir}/report/
commands = py.test --cov=redisgraph tests/unit/ --cov-report=xml:{envdir}/report/coverage.xml --cov-report=html:{envdir}/report/html

[testenv:func]
commands = py.test --cov=redisgraph tests/functional/ --cov-report=html:{envdir}/report/
commands = py.test --cov=redisgraph tests/functional/ --cov-report=xml:{envdir}/report/coverage.xml --cov-report=html:{envdir}/report/html

[testenv:venv]
commands = {posargs}

[testenv:sdist]
deps =
commands = python setup.py sdist

[flake8]
show-source = true
# TODO(boris-42): Enable E226 and E501 rules
Expand Down