diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 04408333522c1f41857a77db4a1af03a1d04a3db..44a158b050e3ed726a7ba02204f3f7af76df7054 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,8 +4,6 @@ before_script:
   - pip install poetry
   - pip install numpy
   - pip install coverage
-  - poetry install
-  - source `poetry env info --path`/bin/activate
 
 stages:
   - build_package
@@ -20,7 +18,8 @@ build_package:
 test:
   stage: testing
   needs: [build_package]
-  script: 
+  script:
+    - poetry install
     - source `poetry env info --path`/bin/activate
     - make