aboutsummaryrefslogtreecommitdiffstats
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authornico <nico@magicbroccoli.de>2020-06-27 00:33:10 +0200
committernico <nico@magicbroccoli.de>2020-06-27 00:33:10 +0200
commit453d054ebbab62080c1483d6d160e251f4841155 (patch)
tree5fc82ecc99d1b578a4a5e6cc98b0dfebfebb5147 /.gitlab-ci.yml
parente503508b5b1b14dd61a1426b798837f873ba772e (diff)
gitlab ci caching
+ add pip caching + add venv caching
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml17
1 files changed, 16 insertions, 1 deletions
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