mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
activate test env
needed for codecov to find necessary commands codecov appears to need git as well environment variables must be set at runtime using a weird [$BASH_ENV trick](https://circleci.com/docs/2.0/env-vars/#using-bash_env-to-set-environment-variables) since circle doesn't support simple `PATH: bin:$PATH` in the environment variable spec.
This commit is contained in:
@@ -14,7 +14,7 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
name: install python
|
name: install python
|
||||||
command: |
|
command: |
|
||||||
apt-get update --yes && apt-get install --yes python3 python3-venv
|
apt-get update --yes && apt-get install --yes python3 python3-venv git
|
||||||
|
|
||||||
# Download and cache dependencies
|
# Download and cache dependencies
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
@@ -26,12 +26,13 @@ jobs:
|
|||||||
name: Setup venv
|
name: Setup venv
|
||||||
command: |
|
command: |
|
||||||
python3 -m venv /srv/venv
|
python3 -m venv /srv/venv
|
||||||
|
echo 'export PATH=/srv/venv/bin:$PATH' >> $BASH_ENV
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: install dependencies
|
name: install dependencies
|
||||||
command: |
|
command: |
|
||||||
/srv/venv/bin/pip install -r dev-requirements.txt
|
pip install -r dev-requirements.txt
|
||||||
/srv/venv/bin/pip install -e .
|
pip install -e .
|
||||||
|
|
||||||
- save_cache:
|
- save_cache:
|
||||||
paths:
|
paths:
|
||||||
@@ -41,12 +42,12 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
name: run unit tests
|
name: run unit tests
|
||||||
command: |
|
command: |
|
||||||
/srv/venv/bin/py.test --cov=tljh tests/
|
py.test --cov=tljh tests/
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: upload code coverage stats
|
name: upload code coverage stats
|
||||||
command: |
|
command: |
|
||||||
/srv/venv/bin/codecov
|
codecov
|
||||||
|
|
||||||
integration-test:
|
integration-test:
|
||||||
docker:
|
docker:
|
||||||
|
|||||||
Reference in New Issue
Block a user