From f1b2b931196bf6d3676c5ea06cd7bedf2949b70c Mon Sep 17 00:00:00 2001
From: Antoine Gaudron-desjardins <antoine.gaudrondesjardins@student-cs.fr>
Date: Thu, 7 Jul 2022 13:22:41 +0200
Subject: [PATCH] improve ci

---
 .gitlab-ci.yml | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ebe85e1..72dcf88 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -37,6 +37,11 @@ workflow:
     - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
     - if: $CI_COMMIT_BRANCH
 
+cache:
+  paths:
+    - venv/
+    - frontend/node_modules/
+
 # include:
 #   - template: 'Code-Quality.gitlab-ci.yml'
 
@@ -48,12 +53,9 @@ workflow:
 
 install-virtualenv:
   stage: build
-  cache: 
-    paths:
-      - venv/
   script:
-    - python3 -m venv ./venv
-    - source ./venv/bin/activate
+    - python3 -m venv venv/
+    - source venv/bin/activate
     - pip install --upgrade pip && pip install pip-tools
     - pip install -r ./backend/requirements.txt
 
@@ -61,9 +63,6 @@ install-virtualenv:
 install-npm-packages:
   image: node:14.6.0
   stage: build
-  cache:
-    paths:
-      - frontend/node_modules/
   script:
     - cd ./frontend
     - npm ci
@@ -77,7 +76,7 @@ install-npm-packages:
 lint-back:
   stage: test
   before_script:
-    - source ./venv/bin/activate
+    - source venv/bin/activate
     - pip install pycodestyle
   script:
     - pycodestyle --config=./backend/setup.cnf ./backend
-- 
GitLab