From 77cf8f5bafb37f957173456780e142c5eb7a942e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Victor=20L=C3=B6fgren?= <victor.l0fgr3n@gmail.com>
Date: Tue, 16 Feb 2021 11:47:42 +0100
Subject: [PATCH] #3: Add server test pipline

---
 .gitignore     |  3 ++-
 .gitlab-ci.yml | 24 ++++++++++++++++++++++++
 2 files changed, 26 insertions(+), 1 deletion(-)
 create mode 100644 .gitlab-ci.yml

diff --git a/.gitignore b/.gitignore
index 0d14ca4d..9f28e5cb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
 __pycache__
 *.db
 */env
-*.coverage
\ No newline at end of file
+*.coverage
+.pytest_cache
\ No newline at end of file
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 00000000..7824284f
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,24 @@
+image: python
+
+stages:
+  - setup
+  - test
+
+setup:
+  stage: setup
+  script:
+    - cd server
+    - pip install virtualenv
+    - python -m venv env
+    - source env/bin/activate
+    - pip install -r requirements.txt
+  artifacts:
+    paths:
+      - server/env
+
+test:
+  stage: test
+  script:
+    - cd server
+    - source env/bin/activate
+    - pytest --cov app test/
-- 
GitLab