mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Reuse command
This commit is contained in:
@@ -1,4 +1,22 @@
|
|||||||
version: 2
|
version: 2.1
|
||||||
|
commands:
|
||||||
|
setup_venv:
|
||||||
|
description: Setup hub venv
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
name: Setup venv
|
||||||
|
command: |
|
||||||
|
python3 -m venv /srv/venv
|
||||||
|
echo 'export PATH=/srv/venv/bin:$PATH' >> $BASH_ENV
|
||||||
|
|
||||||
|
install_python:
|
||||||
|
description: Install python3, venv, git and make
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
name: install python
|
||||||
|
command: |
|
||||||
|
apt-get update --yes && apt-get install --yes python3 python3-venv git make
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
unit-test:
|
unit-test:
|
||||||
docker:
|
docker:
|
||||||
@@ -11,10 +29,7 @@ jobs:
|
|||||||
- checkout
|
- checkout
|
||||||
|
|
||||||
# Setup Python
|
# Setup Python
|
||||||
- run:
|
- install_python
|
||||||
name: install python
|
|
||||||
command: |
|
|
||||||
apt-get update --yes && apt-get install --yes python3 python3-venv git
|
|
||||||
|
|
||||||
# Download and cache dependencies
|
# Download and cache dependencies
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
@@ -22,12 +37,7 @@ jobs:
|
|||||||
- v1-dependencies-py3.6-{{ checksum "setup.py" }}-{{ checksum "dev-requirements.txt" }}
|
- v1-dependencies-py3.6-{{ checksum "setup.py" }}-{{ checksum "dev-requirements.txt" }}
|
||||||
- v1-dependencies-py3.6-
|
- v1-dependencies-py3.6-
|
||||||
|
|
||||||
- run:
|
- setup_venv
|
||||||
name: Setup venv
|
|
||||||
command: |
|
|
||||||
python3 -m venv /srv/venv
|
|
||||||
echo 'export PATH=/srv/venv/bin:$PATH' >> $BASH_ENV
|
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: install dependencies
|
name: install dependencies
|
||||||
command: |
|
command: |
|
||||||
@@ -59,7 +69,7 @@ jobs:
|
|||||||
command: |
|
command: |
|
||||||
apk add --no-cache python3 pytest
|
apk add --no-cache python3 pytest
|
||||||
|
|
||||||
# - checkout
|
- checkout
|
||||||
- setup_remote_docker
|
- setup_remote_docker
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
@@ -103,21 +113,13 @@ jobs:
|
|||||||
- checkout
|
- checkout
|
||||||
|
|
||||||
# Setup Python
|
# Setup Python
|
||||||
- run:
|
- install_python
|
||||||
name: install python
|
|
||||||
command: |
|
|
||||||
apt-get update --yes && apt-get install --yes python3 python3-venv git make
|
|
||||||
|
|
||||||
# Download and cache dependencies
|
# Download and cache dependencies
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
key: v1-dependencies-py3.6-sphinx
|
key: v1-dependencies-py3.6-sphinx
|
||||||
|
|
||||||
- run:
|
- setup_venv
|
||||||
name: Setup venv
|
|
||||||
command: |
|
|
||||||
python3 -m venv /srv/venv
|
|
||||||
echo 'export PATH=/srv/venv/bin:$PATH' >> $BASH_ENV
|
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: install dependencies
|
name: install dependencies
|
||||||
command: |
|
command: |
|
||||||
|
|||||||
Reference in New Issue
Block a user