From 30ed499ce6ac7a3f36ec12847c0df5191c2099e9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jakob=20Karevold=20Gr=C3=B8nhaug?= <jakobkg@stud.ntnu.no>
Date: Mon, 17 Apr 2023 14:46:32 +0200
Subject: [PATCH] Update .gitlab-ci.yml file

---
 .gitlab-ci.yml | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b7e86ec..df3a133 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,7 +1,6 @@
 image: node:latest
 
-stages:          # List of stages for jobs, and their order of execution
-  - npm
+stages:
   - build
   - test
 
@@ -16,11 +15,6 @@ cache:
 before_script:
   - npm ci --cache .npm --prefer-offline
 
-npm:
-  stage: npm
-  script:
-    - npm ci
-
 build-job:       # This job runs in the build stage, which runs first.
   stage: build
   script:
@@ -29,11 +23,18 @@ build-job:       # This job runs in the build stage, which runs first.
 unit-test-job:   # This job runs in the test stage.
   stage: test    # It only starts when the job in the build stage completes successfully.
   script:
-    - npm i
     - npm run test:unit
 
-e2e-test-job:    # This job runs in the test stage.
+e2e-test-ff-job:    # This job runs in the test stage.
+  image: cypress/browsers:latest
+  stage: test    # It only starts when the job in the build stage completes successfully.
+  script:
+    - npm run dev &
+    - npx cypress run --browser firefox
+
+e2e-test-chrome-job:    # This job runs in the test stage.
+  image: cypress/browsers:latest
   stage: test    # It only starts when the job in the build stage completes successfully.
   script:
-    - npm i
-    - npm run test:e2e
+    - npm run dev &
+    - npx cypress run --browser chrome
-- 
GitLab