aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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