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

Use a venv to run unit tests #72

Merged
merged 1 commit into from
Jul 24, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 11 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,39 @@ jobs:
- run:
name: install python
command: |
apt-get update --yes && apt-get install --yes python3 python3-pip
apt-get update --yes && apt-get install --yes python3 python3-venv

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-py3.6-{{ checksum "setup.py" }}-{{ checksum "dev-requirements.txt" }}
- v1-dependencies-py3.6-

- run:
name: Setup venv
command: |
python3 -m venv /srv/venv

- run:
name: install dependencies
command: |
pip3 install -r dev-requirements.txt
pip3 install -e .
/srv/venv/bin/pip install -r dev-requirements.txt
/srv/venv/bin/pip install -e .

- save_cache:
paths:
- /usr/local/lib/python3.6
- /srv/venv/
key: v1-dependencies-py3.6-{{ checksum "setup.py" }}-{{ checksum "dev-requirements.txt" }}

- run:
name: run unit tests
command: |
py.test --cov=tljh tests/
/srv/venv/bin/py.test --cov=tljh tests/

- run:
name: upload code coverage stats
command: |
codecov
/srv/venv/bin/codecov

integration-test:
docker:
Expand Down