diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 16f0427b98959942194df8e876002665089d9f21..058ba2ff8aae46919427a4051bad4aa6368b0f51 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,8 +1,8 @@
 stages:
   - github-sync
   - build
-  - pages
   - test
+  - pages
   - package
   - prerelease
   - release
@@ -37,6 +37,10 @@ push_to_github:
 build:
   <<: *nvm_env
   stage: build
+  cache:
+    untracked: true
+    paths:
+      - node_modules/
   script:
     - yarn
 
@@ -61,8 +65,11 @@ pages:
 test:
   <<: *nvm_env
   stage: test
+  cache:
+    untracked: true
+    paths:
+      - node_modules/
   script:
-    - yarn
     - yarn test
     # Clean the dump directory before testing
     - rm -rf /tmp/duniter_ci_dump/