From 453d054ebbab62080c1483d6d160e251f4841155 Mon Sep 17 00:00:00 2001 From: nico Date: Sat, 27 Jun 2020 00:33:10 +0200 Subject: gitlab ci caching + add pip caching + add venv caching --- .gitlab-ci.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5189dd4..f99e762 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,10 +1,23 @@ image: "python:3.7" +variables: + # force pip cache dir + PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" + +cache: + paths: + # utilize pip caching + - .cache/pip + # cache the virtualenv to reduce load + - venv/ + # setup environemnt before_script: - python --version + - pip install virtualenv + - virtualenv venv + - source venv/bin/activate - pip install -r requirements.txt - - pip install flake8 stages: - syntax @@ -12,6 +25,8 @@ stages: syntax: stage: syntax + before_script: + - pip install flake8 script: # breaking errors ie syntax errors - flake8 --select=E9,F63,F7,F82 --show-source -- cgit v1.2.3-18-g5258