From 231197a06abd592a108cecea0b36f46e5aee2308 Mon Sep 17 00:00:00 2001
From: Sven-Erik Teveldal Nystad <senystad@stud.ntnu.no>
Date: Mon, 12 Apr 2021 20:22:21 +0000
Subject: [PATCH] Update .gitlab-ci.yml

---
 .gitlab-ci.yml | 29 +++++++++++++++--------------
 1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e5219303..604674a5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,29 +4,30 @@ stages:
 variables:
   npm_config_cache: "$CI_PROJECT_DIR/.npm"
   CYPRESS_CACHE_FOLDER: "$CI_PROJECT_DIR/cache/Cypress"
-    
-cache: 
+
+# https://gitlab.com/help/ci/caching/index.md
+cache:
   key: ${CI_COMMIT_REF_SLUG}
-  paths: 
+  paths:
     - .npm
-    - cache/Cypress 
+    - cache/Cypress
     - node_modules
-    
+
 test:
   image: cypress/base:10
   stage: test
   script:
     # install dependencies
     - npm ci
-    
+
     # Kjør express-serveren i bakgrunnen
     - npm start &
-    
-    # Kjør testene
+
+    # run Cypress tests
     - npm test
-    artifacts:
-      when: always
-      paths:
-        - cypress/videos
-        - cypress/screenshots
-      expire_in: 1 day
\ No newline at end of file
+  artifacts:
+    when: always
+    paths:
+      - cypress/videos
+      - cypress/screenshots
+    expire_in: 1 week
-- 
GitLab