From 471870397612b74aa2e5b79685b0544f2be8a64a Mon Sep 17 00:00:00 2001
From: Timo Koch <timo.koch@iws.uni-stuttgart.de>
Date: Sat, 20 Nov 2021 16:56:50 +0100
Subject: [PATCH] [ci][python] Linters are now installed in venv as deps of
 dumux

---
 .gitlab-ci/default.yml | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci/default.yml b/.gitlab-ci/default.yml
index 17f7d77393..768c56edaa 100644
--- a/.gitlab-ci/default.yml
+++ b/.gitlab-ci/default.yml
@@ -51,13 +51,15 @@ black (python):
 pylint-flake8 (python):
   stage: linting
   script:
+    # restore Python virtual env from cache (job:configure artifacts) (Dune 2.9)
+    - |
+      if [ -d "build-cmake/dune-env" ]; then
+        rm -r /dune/modules/dune-common/build-cmake/dune-env
+        mv build-cmake/dune-env /dune/modules/dune-common/build-cmake/dune-env
+      fi
     - |
       if [ -d build-cmake/python/dumux ] ; then
         source bin/testing/ci-setup-python-env.sh
-        # if we are in venv (Dune 2.9) install linters
-        if [ -d "/dune/modules/dune-common/build-cmake/dune-env" ]; then
-          python -m pip install pylint flake8
-        fi
         pylint --rcfile=.pylintrc build-cmake/python/dumux
         pylint --rcfile=.pylintrc bin
         flake8 build-cmake/python/dumux
-- 
GitLab