From 251909ca0aaf289b8a563e304b2804e6f8eb92d5 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:17:56 +0200
Subject: [PATCH] Update .gitlab-ci.yml file

---
 .gitlab-ci.yml | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 .gitlab-ci.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..c1bd2fa
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,20 @@
+image: node:latest
+
+stages:          # List of stages for jobs, and their order of execution
+  - build
+  - test
+
+build-job:       # This job runs in the build stage, which runs first.
+  stage: build
+  script:
+    - npm ci
+
+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 run test:unit
+
+e2e-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 run test:e2e
-- 
GitLab