diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000000000000000000000000000000000000..d702d972d4bbd01417313c210a3499c7f674b274
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,54 @@
+stages:
+  - vendor
+  - test
+
+.php: &php
+  tags:
+    - docker
+  image: php:${PHP_VERSION}-cli-stretch
+  variables:
+    COMPOSER_HOME: "$CI_PROJECT_DIR/.composer"
+    COMPOSER_NO_INTERACTION: "1"
+    COMPOSER_ALLOW_SUPERUSER: "1"
+    COMPOSER_INSTALLER_COMMITID: "5eb0614d3fa7130b363698d3dca52c619b463615"
+    PHP_VERSION: "7.1"
+  before_script:
+    - apt-get update -yqq && apt-get install -yqq unzip git-core
+    - php -v
+    - curl -sSfL https://raw.githubusercontent.com/composer/getcomposer.org/${COMPOSER_INSTALLER_COMMITID}/web/installer | php -- --install-dir=/usr/local/bin --filename=composer --quiet
+    - composer -V
+
+vendor:
+  <<: *php
+  stage: vendor
+  dependencies: []
+  script:
+    - composer global require hirak/prestissimo --quiet
+    - composer install --no-suggest --no-progress
+  artifacts:
+    name: "$CI_JOB_NAME"
+    paths:
+      - vendor
+    expire_in: 4 hours
+  cache:
+    key: "$CI_BUILD_REF_NAME-composer"
+    paths:
+      - "$COMPOSER_HOME"
+
+.php-test: &php-test
+  <<: *php
+  stage: test
+  dependencies:
+    - vendor
+  script: composer ${CI_JOB_NAME}
+
+phploc: { <<: *php-test }
+
+test:lint: { <<: *php-test }
+test:phpcpd: { <<: *php-test }
+test:phpmd: { <<: *php-test }
+test:phpstan: { <<: *php-test }
+test:phpunit: { <<: *php-test }
+test:composer-validate: { <<: *php-test }
+test:composer-require: { <<: *php-test }
+test:security: { <<: *php-test }