2018-06-29 02:05:36 -07:00
|
|
|
version: 2
|
|
|
|
|
jobs:
|
2018-07-11 12:16:46 -07:00
|
|
|
unit-test:
|
2018-06-29 02:05:36 -07:00
|
|
|
docker:
|
2018-07-11 12:16:46 -07:00
|
|
|
- image: continuumio/miniconda3:4.5.4
|
2018-06-29 02:05:36 -07:00
|
|
|
|
|
|
|
|
working_directory: ~/repo
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
- checkout
|
|
|
|
|
|
|
|
|
|
# Download and cache dependencies
|
|
|
|
|
- restore_cache:
|
|
|
|
|
keys:
|
2018-06-29 02:18:45 -07:00
|
|
|
- v1-dependencies-miniconda3-4.5.4-{{ checksum "setup.py" }}-{{ checksum "dev-requirements.txt" }}
|
|
|
|
|
- v1-dependencies-miniconda3-4.5.4-
|
2018-06-29 02:05:36 -07:00
|
|
|
|
|
|
|
|
- run:
|
|
|
|
|
name: install dependencies
|
|
|
|
|
command: |
|
|
|
|
|
pip install -r dev-requirements.txt
|
|
|
|
|
pip install -e .
|
|
|
|
|
|
|
|
|
|
- save_cache:
|
|
|
|
|
paths:
|
2018-06-29 02:18:45 -07:00
|
|
|
- /opt/conda
|
2018-06-29 02:20:43 -07:00
|
|
|
key: v1-dependencies-miniconda3-4.5.4-{{ checksum "setup.py" }}-{{ checksum "dev-requirements.txt" }}
|
2018-06-29 02:05:36 -07:00
|
|
|
|
|
|
|
|
- run:
|
2018-06-29 02:26:20 -07:00
|
|
|
name: run unit tests
|
2018-06-29 02:05:36 -07:00
|
|
|
command: |
|
2018-07-11 09:40:26 -07:00
|
|
|
py.test tests/
|
2018-06-29 02:26:20 -07:00
|
|
|
|
2018-07-11 12:16:46 -07:00
|
|
|
integration-test:
|
|
|
|
|
docker:
|
|
|
|
|
- image: docker:18.05.0-ce-git
|
2018-06-29 02:26:20 -07:00
|
|
|
# Run full installer test
|
2018-07-11 12:16:46 -07:00
|
|
|
steps:
|
|
|
|
|
- run:
|
|
|
|
|
name: setup python3
|
|
|
|
|
command: |
|
|
|
|
|
apk add --no-cache python3
|
|
|
|
|
|
2018-06-29 02:26:20 -07:00
|
|
|
- setup_remote_docker
|
|
|
|
|
|
2018-06-29 02:37:06 -07:00
|
|
|
- run:
|
2018-06-29 02:56:43 -07:00
|
|
|
name: build systemd image
|
2018-06-29 02:37:06 -07:00
|
|
|
command: |
|
2018-07-11 02:04:41 -07:00
|
|
|
python3 .circleci/integration-test.py build-image
|
2018-06-29 02:26:20 -07:00
|
|
|
|
|
|
|
|
- run:
|
2018-06-29 02:56:43 -07:00
|
|
|
name: start systemd image
|
2018-06-29 02:26:20 -07:00
|
|
|
command: |
|
2018-07-11 02:04:41 -07:00
|
|
|
python3 .circleci/integration-test.py start-container
|
|
|
|
|
|
2018-06-29 02:56:43 -07:00
|
|
|
- run:
|
2018-06-29 03:12:16 -07:00
|
|
|
name: run tljh installer
|
2018-06-29 02:56:43 -07:00
|
|
|
command: |
|
2018-07-11 02:21:11 -07:00
|
|
|
python3 .circleci/integration-test.py copy . /srv/src
|
2018-07-11 02:04:41 -07:00
|
|
|
python3 .circleci/integration-test.py run 'python3 /srv/src/bootstrap/bootstrap.py'
|
2018-06-29 03:12:16 -07:00
|
|
|
|
|
|
|
|
- run:
|
|
|
|
|
name: check jupyterhub is up
|
|
|
|
|
command: |
|
2018-07-11 02:35:17 -07:00
|
|
|
python3 .circleci/integration-test.py run 'curl -L --fail http://127.0.0.1'
|
2018-07-11 12:21:57 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
workflows:
|
|
|
|
|
version: 2
|
|
|
|
|
build_and_test:
|
|
|
|
|
jobs:
|
|
|
|
|
- unit-test
|
|
|
|
|
- integration-test
|