Use cache

This commit is contained in:
Kayou 2019-12-23 20:28:24 +08:00 committed by GitHub
parent 2b0711b1f4
commit e3a3b00034
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,14 +6,24 @@ stages:
image: stretch:after-postinstall image: stretch:after-postinstall
before_script: before_script:
- apt-get install python-pip -y - 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 - 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 - cd apps
- git pull > /dev/null 2>&1 - git pull > /dev/null 2>&1
- popd - popd
- export PYTEST_ADDOPTS="--color=yes" - export PYTEST_ADDOPTS="--color=yes"
cache:
paths:
- .pip
- src/yunohost/tests/apps
key: "$CI_JOB_STAGE-$CI_COMMIT_REF_SLUG"
postinstall: postinstall:
image: stretch:before-postinstall image: stretch:before-postinstall