diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000000000000000000000000000000000000..f562dfa280375dc6fd3be7f3701b46d3707184bf
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,5 @@
+image: python:2.7
+
+test:
+  - cat requirements.txt | xargs -n 1 pip install
+  - python setup.py test
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000000000000000000000000000000000000..29b378c4b39b8b1dd30824cb3d1fda0ec9c987c1
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,7 @@
+cython>=0.24
+six>=1.10.0
+numpy>=1.11.1
+matplotlib>=1.5.1
+nibabel>=2.0.2
+git+https://github.com/pauldmccarthy/indexed_gzip.git#egg=indexed_gzip
+git+ssh://git@git.fmrib.ox.ac.uk/paulmc/props.git#egg=props
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..9af7e6f11bb01f7306f796faf7bfbe3e2955cd94
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,2 @@
+[aliases]
+test=pytest
\ No newline at end of file
diff --git a/setup.py b/setup.py
index b51d54995282a151d5f6a1f07d434d47521e7c55..932946572238283e11f053536c54e262598ff9b6 100644
--- a/setup.py
+++ b/setup.py
@@ -23,6 +23,11 @@ version = {}
 with open(op.join(basedir, "fsl", "version.py")) as f:
     exec(f.read(), version)
 
+install_requires = open(op.join(basedir, 'requirements.txt'), 'rt').readlines()
+
+dependency_links = [i for i in install_requires if     i.startswith('git')]
+install_requires = [i for i in install_requires if not i.startswith('git')]
+
 setup(
 
     name='fslpy',
@@ -48,12 +53,10 @@ setup(
 
     packages=find_packages(exclude=('doc')),
 
-    install_requires=[
-        'pyopengl>=3.1.0',
-        'pyparsing>=2.0.3',
-        'numpy>=1.8.1',
-        'scipy>=0.14.0',
-        'matplotlib>=1.3.1',
-        'nibabel>=1.3.0',
-        'Pillow>=2.5.3'],
+    install_requires=install_requires,
+    dependency_links=dependency_links,
+
+    setup_requires=['pytest-runner'],
+    tests_require=['pytest', 'pytest-runner'],
+    test_suite='tests',
 )
diff --git a/test/test_imagewrapper.py b/tests/test_imagewrapper.py
similarity index 100%
rename from test/test_imagewrapper.py
rename to tests/test_imagewrapper.py