diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c3a70e46e042341656f2f8af2dc54aff3efa6386..8d96b799f9bd876a0faad00cb023b4f63107bffa 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,19 +1,27 @@
-upstream_tests:
+install:
+  stage: install
   image: docker.io/node:current
-  before_script:
+  script:
     - npm ci
+  artifacts:
+    paths:
+      - node_modules
+
+upstream_tests:
+  stage: test
+  image: docker.io/node:current
   script:
     - npm run test:ci
   artifacts:
     when: always
     paths:
       - junit.xml
-      - node_modules
     reports:
       junit: junit.xml
 
 pages:
   stage: deploy
+  image: docker.io/node:current
   script:
     - npm run build
     - rm -rf public