Add .gitlab-ci.yml

This commit is contained in:
Mike Koch 2017-06-22 21:37:56 -04:00
parent 535e48225d
commit 99ad9ecd63
2 changed files with 22 additions and 0 deletions

8
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,8 @@
image: php:7.0
before_script:
- bash ci/docker_install.sh > /dev/null
test:app:
script:
- phpunit --configuration api/Tests/phpunit.xml

14
ci/docker_install.sh Normal file
View File

@ -0,0 +1,14 @@
#!/bin/bash
# We need to install dependencies only for Docker
[[ ! -e /.dockerenv ]] && exit 0
set -xe
# Install git (the php image doesn't have it) which is required by composer
apt-get update -yqq
apt-get install git -yqq
# Install phpunit, the tool that we will use for testing
curl --location --output /usr/local/bin/phpunit https://phar.phpunit.de/phpunit.phar
chmod +x /usr/local/bin/phpunit