From e3a3b00034a77695a2af5a89fa50084d6b1d808b Mon Sep 17 00:00:00 2001 From: Kayou Date: Mon, 23 Dec 2019 20:28:24 +0800 Subject: [PATCH] Use cache --- .gitlab-ci.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d28f46ba5..c52092c5c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,14 +6,24 @@ stages: image: stretch:after-postinstall before_script: - apt-get install python-pip -y - - pip2 install pytest pytest-sugar pytest-mock requests-mock mock + - mkdir -p .pip + - pip install -U pip + - hash -d pip + - pip --cache-dir=.pip install pytest pytest-sugar pytest-mock requests-mock mock - pushd src/yunohost/tests - - git clone https://github.com/YunoHost/test_apps ./apps + - > + if [ ! -d "./apps" ]; then + git clone https://github.com/YunoHost/test_apps ./apps + fi - cd apps - git pull > /dev/null 2>&1 - popd - export PYTEST_ADDOPTS="--color=yes" - + cache: + paths: + - .pip + - src/yunohost/tests/apps + key: "$CI_JOB_STAGE-$CI_COMMIT_REF_SLUG" postinstall: image: stretch:before-postinstall