diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000000000000000000000000000000000000..84fb63b3c6f54a11ea6f6e97f74b7207660b4edb
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,19 @@
+test-py2:
+  stage: test
+  script:
+    - ./tests/run_ci.sh 2
+
+
+test-py3:
+  stage: test
+  script:
+    - ./tests/run_ci.sh 3
+
+sdist:
+  stage: deploy
+  only:
+    - /^\d+\.\d+\.\d+$/
+  script:
+    - rm -f dist/*
+    - python setup.py sdist
+    - twine upload -r sips dist/*.tar.gz
diff --git a/tests/run_ci.sh b/tests/run_ci.sh
new file mode 100755
index 0000000000000000000000000000000000000000..a9a4dada59d140eb31f4d9232ebf6c29f3ba13df
--- /dev/null
+++ b/tests/run_ci.sh
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+ver=${1:-3}
+docker run --rm -v $PWD:/code -w /code python:${ver} /code/tests/run.sh