diff --git a/.travis.yml b/.travis.yml index 0f0d73693e..2c0a5a3d12 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,6 +20,7 @@ env: - TARGET="71" - TARGET="72" - TARGET="73" + - TARGET="Lint" before_install: # check running "docker engine" and "docker-compose" version on travis @@ -41,8 +42,8 @@ before_script: - sudo sysctl -w vm.max_map_count=262144 script: - - make tests TARGET=$TARGET - - if [ "$TARGET" == "72" ] ; then make check-style ; fi + - if [ "$TARGET" != "Lint" ] ; then make tests TARGET=$TARGET ; fi + - if [ "$TARGET" == "Lint" ] ; then make check-style ; fi after_script: - cat /var/log/elasticsearch/*.log diff --git a/env/elastica/Docker70 b/env/elastica/Docker70 index 07799cf8be..5b081d6ec4 100644 --- a/env/elastica/Docker70 +++ b/env/elastica/Docker70 @@ -34,7 +34,5 @@ ENV PATH=/root/composer/vendor/bin:$PATH COPY composer.json /root/composer/ -RUN composer global require --no-update friendsofphp/php-cs-fixer:^2.0 - # Install development tools, prefer source removed as automatic fallback now RUN composer global install diff --git a/env/elastica/Docker71 b/env/elastica/Docker71 index fa64e2b2e2..fb6aefc4e9 100644 --- a/env/elastica/Docker71 +++ b/env/elastica/Docker71 @@ -34,7 +34,5 @@ ENV PATH=/root/composer/vendor/bin:$PATH COPY composer.json /root/composer/ -RUN composer global require --no-update friendsofphp/php-cs-fixer:^2.0 - # Install development tools, prefer source removed as automatic fallback now RUN composer global install diff --git a/env/elastica/Docker72 b/env/elastica/Docker72 index fe961449b4..7ec1e8c50f 100644 --- a/env/elastica/Docker72 +++ b/env/elastica/Docker72 @@ -32,7 +32,5 @@ ENV PATH=/root/composer/vendor/bin:$PATH COPY composer.json /root/composer/ -RUN composer global require --no-update friendsofphp/php-cs-fixer:^2.0 - # Install development tools, prefer source removed as automatic fallback now RUN composer global install diff --git a/env/elastica/Lint b/env/elastica/Lint new file mode 100644 index 0000000000..fe961449b4 --- /dev/null +++ b/env/elastica/Lint @@ -0,0 +1,38 @@ +# This image is the base image for the Elastica development and includes all parts which rarely change +# PHP 7 Docker file with Composer installed +FROM php:7.2 +MAINTAINER Nicolas Ruflin + +RUN apt-get update && apt-get install -y \ + cloc \ + git \ + graphviz \ + libxslt-dev \ + nano \ + zip unzip \ + wget + # XSL and Graphviz for PhpDocumentor + +RUN docker-php-ext-install sockets xsl + +RUN rm -r /var/lib/apt/lists/* + +# Xdebug for coverage report +RUN pecl install xdebug-2.6.1 + +RUN echo "memory_limit=1024M" >> /usr/local/etc/php/conf.d/memory-limit.ini +RUN echo "date.timezone=UTC" >> /usr/local/etc/php/conf.d/timezone.ini + +# Install and setup composer +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ENV COMPOSER_HOME /root/composer + +# Add composer bin to the environment +ENV PATH=/root/composer/vendor/bin:$PATH + +COPY composer.json /root/composer/ + +RUN composer global require --no-update friendsofphp/php-cs-fixer:^2.0 + +# Install development tools, prefer source removed as automatic fallback now +RUN composer global install diff --git a/env/elastica/composer.json b/env/elastica/composer.json index 7292f35eec..705b90c6ed 100644 --- a/env/elastica/composer.json +++ b/env/elastica/composer.json @@ -13,6 +13,7 @@ ], "require": { "php": "^7.0", + "phpdocumentor/phpdocumentor": "^2.9", "mayflower/php-codebrowser": "~1.1", "pdepend/pdepend": "^2.5", "phploc/phploc": "^4.0",