From 25f1ff318836b13cde0fdcd770006e5791165e92 Mon Sep 17 00:00:00 2001 From: "Marcel Kapfer (mmk2410)" Date: Sat, 4 Jun 2016 16:46:36 +0200 Subject: [PATCH] still trying to make gitlab ci work --- .gitlab-ci.yml | 6 ++---- ci/docker_install.sh | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 ci/docker_install.sh 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 +