From 2b1c46317fc59a6a7d43d3e6e8d0653f2768b233 Mon Sep 17 00:00:00 2001
From: Eliot Berriot <contact@eliotberriot.com>
Date: Sat, 9 Jun 2018 17:12:58 +0200
Subject: [PATCH] See #297: flake8 CI job

---
 .gitlab-ci.yml | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 23a3c4ce..345451f1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -22,8 +22,17 @@ black:
   script:
     - black --check api/
 
+flake8:
+  image: python:3.6
+  stage: lint
+  variables:
+    GIT_STRATEGY: fetch
+  before_script:
+    - pip install flake8
+  script:
+    - flake8 api
   cache:
-    key: "$CI_PROJECT_ID__black_pip_cache"
+    key: "$CI_PROJECT_ID__flake8_pip_cache"
     paths:
       - "$PIP_CACHE_DIR"
 
-- 
GitLab