diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 37df8f097f026fe644ffded9a813e29008af3cb5..29712beb6e945e59e10a8d6e9f741853d3465d1b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,40 +1,74 @@
-# This file is a template, and might need editing before it works on your project.
-# This file is a template, and might need editing before it works on your project.
 image: python:latest
 
-before_script:
-  - python3 -V                                   # Print out python version for debugging
-
 stages:
   - build
   - test
-  - deploy
+  - coverage
+  - doc_build
 
 navipy_install:
   stage: build
+  before_script:
+  - python3 -V # Print out python version for debugging
+
   script:
+  - pip3 install virtualenv
+  - virtualenv venv
+  - source venv/bin/activate
   - python3 setup.py bdist_wheel
 
+  artifacts:
+    paths:
+      - venv
+
 flake8:
   stage: test
+  dependencies:
+  - navipy_install
+
   script:
-  - pip3 install --user tox flake8
+  - source $CI_PROJECT_DIR/venv/bin/activate
   - python3 -m flake8 navipy/*.py
   
 navipy_unittest:
   stage: test
+  dependencies: 
+  - navipy_install
+
+  script:
+  - source $CI_PROJECT_DIR/venv/bin/activate
+  - python3 -m coverage run -m unittest discover navipy
+
+  artifacts:
+    paths:
+      - .coverage
+
+coverage:
+  stage: coverage
+  dependencies: 
+  - navipy_install
+  - navipy_unittest
+  
   script:
-  - pip3 install --user networkx
-  - python3 -m unittest discover navipy
+  - source $CI_PROJECT_DIR/venv/bin/activate
+  - python3 -m coverage html
+
+  artifacts:
+    paths:
+      - coverage_html_report
+    expire_in: 1 day
 
 doc_build:
-  stage: deploy
+  stage: doc_build
+  dependencies:
+  - navipy_install
+  - coverage
+
   script:
-  - pip3 install --user sphinx sphinx-rtd-theme
+  - source $CI_PROJECT_DIR/venv/bin/activate
+  - pip3 install --user sphinx sphinx_rtd_theme
   - cd doc ; make html
-  - mv build/html/ ../public/
+
   artifacts:
     paths:
-    - public
-  only:
-  - master
+    - doc/build
\ No newline at end of file