From df7afc1df1cf4c8b67bcc8842d6f19b6b754210c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?H=C3=A5vard=20Farestveit?= <havard.farestveit@gmail.com>
Date: Mon, 8 Mar 2021 20:29:44 +0100
Subject: [PATCH] Added build stage to gitlab-ci and fixed test-fail in
 User/tests

---
 .gitlab-ci.yml                               | 9 +++++++++
 backend/secfit/users/tests/UserSerializer.py | 3 +--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f1585965..c905c004 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -5,6 +5,15 @@ stages:
   - test
   - deploy
 
+build:
+  image: python:3.8.5-slim
+  before_script:
+    - apt-get clean
+    - pip install -r backend/secfit/requirements.txt
+  script:
+    - cd backend/secfit
+    - python manage.py runserver
+
 test-backend:
   stage: test
   image: python:3.8.5-slim
diff --git a/backend/secfit/users/tests/UserSerializer.py b/backend/secfit/users/tests/UserSerializer.py
index 49ee9805..b290f431 100644
--- a/backend/secfit/users/tests/UserSerializer.py
+++ b/backend/secfit/users/tests/UserSerializer.py
@@ -1,7 +1,6 @@
 from django.test import TestCase
-from backend.secfit.users.serializers import UserSerializer
+from users.serializers import UserSerializer
 from django.contrib.auth import get_user_model
-from rest_framework import serializers
 
 class UserSerializerTestCase(TestCase):
 
-- 
GitLab