diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index bbac90b24bde2b4341d9d3447ea33910871c7e00..878665cd239ef3d87273eb0063440daf8abb0fec 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -5,13 +5,11 @@ image: python:latest
 before_script:
   - python3 -V                                   # Print out python version for debugging
 
-test:
-  script:
-  - python3 setup.py test
-  - pip3 install tox flake8  # you can also use tox
-  - tox -e py36,flake8
+stages:
+  - build
+  - test
 
-run:
+build:
   script:
   - python3 setup.py bdist_wheel
   # an alternative approach is to install and run:
@@ -21,6 +19,14 @@ run:
   #  paths:
   #  - dist/*.whl
 
+test:
+  script:
+  - python3 setup.py test
+  - pip3 install tox flake8  # you can also use tox
+  - tox -e py36,flake8
+
+
+
 pages:
   script:
   - pip3 install sphinx sphinx-rtd-theme