mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
85 lines
2.5 KiB
YAML
85 lines
2.5 KiB
YAML
version: 2
|
|
jobs:
|
|
unit-test:
|
|
docker:
|
|
- image: continuumio/miniconda3:4.5.4
|
|
|
|
working_directory: ~/repo
|
|
|
|
steps:
|
|
- checkout
|
|
|
|
# Download and cache dependencies
|
|
- restore_cache:
|
|
keys:
|
|
- v1-dependencies-miniconda3-4.5.4-{{ checksum "setup.py" }}-{{ checksum "dev-requirements.txt" }}
|
|
- v1-dependencies-miniconda3-4.5.4-
|
|
|
|
- run:
|
|
name: install dependencies
|
|
command: |
|
|
pip install -r dev-requirements.txt
|
|
pip install -e .
|
|
|
|
- save_cache:
|
|
paths:
|
|
- /opt/conda
|
|
key: v1-dependencies-miniconda3-4.5.4-{{ checksum "setup.py" }}-{{ checksum "dev-requirements.txt" }}
|
|
|
|
- run:
|
|
name: run unit tests
|
|
command: |
|
|
py.test --cov=tljh tests/
|
|
|
|
- run:
|
|
name: upload code coverage stats
|
|
command: |
|
|
codecov
|
|
|
|
integration-test:
|
|
docker:
|
|
- image: docker:18.05.0-ce-git
|
|
|
|
steps:
|
|
- run:
|
|
name: setup python3
|
|
command: |
|
|
apk add --no-cache python3
|
|
|
|
- checkout
|
|
- setup_remote_docker
|
|
|
|
- run:
|
|
name: build systemd image
|
|
command: |
|
|
python3 .circleci/integration-test.py build-image
|
|
|
|
- run:
|
|
name: start systemd image
|
|
command: |
|
|
python3 .circleci/integration-test.py start-container
|
|
|
|
- run:
|
|
name: run tljh installer
|
|
command: |
|
|
python3 .circleci/integration-test.py copy . /srv/src
|
|
python3 .circleci/integration-test.py run 'python3 /srv/src/bootstrap/bootstrap.py'
|
|
|
|
- run:
|
|
name: print systemd status + logs
|
|
command: |
|
|
python3 .circleci/integration-test.py run 'journalctl --no-pager'
|
|
python3 .circleci/integration-test.py run 'systemctl --no-pager status jupyterhub configurable-http-proxy'
|
|
|
|
- run:
|
|
name: check jupyterhub is up
|
|
command: |
|
|
python3 .circleci/integration-test.py run 'curl -L --fail http://127.0.0.1'
|
|
|
|
workflows:
|
|
version: 2
|
|
all-tests:
|
|
jobs:
|
|
- unit-test
|
|
- integration-test
|