diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index dfc5887b419aa339603dec7eddc80589f4b44379_LmdpdGxhYi1jaS55bWw=..1a919d33580543773457258d420a9029355eb7e3_LmdpdGxhYi1jaS55bWw= 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,3 +1,10 @@
+lint:
+    image: octobus/ci-py2
+    script:
+      # TODO that should be in the base image
+      - pip install --user flake8
+      - ~/.local/bin/flake8 heptapod setup.py hgext3rd
+
 tests-5.2:
    image: octobus/ci-py2-hgext3rd:hg-5.2
    script:
@@ -1,10 +8,6 @@
 tests-5.2:
    image: octobus/ci-py2-hgext3rd:hg-5.2
    script:
-      - flake8 heptapod setup.py hgext3rd
-      # TODO put py.test in the image
-      # the py.test version combination is the consistent one
-      # provided by Fedora 30 for python2
       - (cd /ci/repos/mercurial; make local)
       - PYTHONPATH=/ci/repos/mercurial python -c "from mercurial import util; print(util.version())"
       - pip install --user pytest==3.10.1 pytest-cov==2.6.0 hg-evolve==9.2.1