mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Merge pull request #74 from jupyterhub/fix-ci
Use a venv to run unit tests
This commit is contained in:
@@ -14,7 +14,7 @@ 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:
|
||||
@@ -22,26 +22,31 @@ jobs:
|
||||
- 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:
|
||||
|
||||
Reference in New Issue
Block a user