diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1a8030e..aa468d8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,13 +1,11 @@ image: php:7.0 before_script: - - apt-get update - - apt-get install -y wget - - wget https://phar.phpunit.de/phpunit.phar + - bash ci/docker_install.sh > /dev/null stages: - test test: script: - - php phpunit.phar tests/ + - phpunit tests/ diff --git a/ci/docker_install.sh b/ci/docker_install.sh new file mode 100644 index 0000000..f1fe43b --- /dev/null +++ b/ci/docker_install.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Only install dependencies for Docker +[[ ! -e /.dockerenv ]] && [[ ! -e /.dockerinit ]] && exit 0 + +set -xe + +# Install git +apt-get update -yqq +apt-get install git -yqq + +# Install phpunit +curl -o /usr/local/bin/phpunit https://phar.phpunit.de/phpunit.phar +chmod +x /usr/local/bin/phpunit +