File tree 7 files changed +49
-9
lines changed
7 files changed +49
-9
lines changed Original file line number Diff line number Diff line change 20
20
- TARGET="71"
21
21
- TARGET="72"
22
22
- TARGET="73"
23
+ - TARGET="Lint"
23
24
24
25
before_install :
25
26
# check running "docker engine" and "docker-compose" version on travis
@@ -41,8 +42,8 @@ before_script:
41
42
- sudo sysctl -w vm.max_map_count=262144
42
43
43
44
script :
44
- - make tests TARGET=$TARGET
45
- - if [ "$TARGET" == "72 " ] ; then make check-style ; fi
45
+ - if [ "$TARGET" != "Lint" ] ; then make tests TARGET=$TARGET ; fi
46
+ - if [ "$TARGET" == "Lint " ] ; then make check-style ; fi
46
47
47
48
after_script :
48
49
- cat /var/log/elasticsearch/*.log
Original file line number Diff line number Diff line change 61
61
make start
62
62
mkdir -p build
63
63
64
- docker run -e "ES_HOST=elasticsearch" --network=elastica_esnet elastica_elastica make phpunit
64
+ docker run -e "ES_HOST=elasticsearch" --network=elastica_esnet elastica_elastica make phpunit
65
65
docker cp elastica:/elastica/build/coverage/ $(shell pwd)/build/coverage
66
66
67
67
# Makes it easy to run a single test file. Example to run IndexTest.php: make test TEST="IndexTest.php"
83
83
84
84
.PHONY : check-style
85
85
check-style :
86
+ docker build -t ruflin/elastica-dev-base -f env/elastica/${TARGET} env/elastica/
87
+ docker build -t ruflin/elastica .
88
+ make start
89
+ mkdir -p build
90
+
86
91
${RUN_ENV} php-cs-fixer fix --allow-risky=yes --dry-run
87
92
88
93
.PHONY : loc
Original file line number Diff line number Diff line change @@ -34,7 +34,5 @@ ENV PATH=/root/composer/vendor/bin:$PATH
34
34
35
35
COPY composer.json /root/composer/
36
36
37
- RUN composer global require --no-update friendsofphp/php-cs-fixer:^2.0
38
-
39
37
# Install development tools, prefer source removed as automatic fallback now
40
38
RUN composer global install
Original file line number Diff line number Diff line change @@ -34,7 +34,5 @@ ENV PATH=/root/composer/vendor/bin:$PATH
34
34
35
35
COPY composer.json /root/composer/
36
36
37
- RUN composer global require --no-update friendsofphp/php-cs-fixer:^2.0
38
-
39
37
# Install development tools, prefer source removed as automatic fallback now
40
38
RUN composer global install
Original file line number Diff line number Diff line change @@ -32,7 +32,5 @@ ENV PATH=/root/composer/vendor/bin:$PATH
32
32
33
33
COPY composer.json /root/composer/
34
34
35
- RUN composer global require --no-update friendsofphp/php-cs-fixer:^2.0
36
-
37
35
# Install development tools, prefer source removed as automatic fallback now
38
36
RUN composer global install
Original file line number Diff line number Diff line change
1
+ # This image is the base image for the Elastica development and includes all parts which rarely change
2
+ # PHP 7 Docker file with Composer installed
3
+ FROM php:7.2
4
+ MAINTAINER Nicolas Ruflin <
[email protected] >
5
+
6
+ RUN apt-get update && apt-get install -y \
7
+ cloc \
8
+ git \
9
+ graphviz \
10
+ libxslt-dev \
11
+ nano \
12
+ zip unzip \
13
+ wget
14
+ # XSL and Graphviz for PhpDocumentor
15
+
16
+ RUN docker-php-ext-install sockets xsl
17
+
18
+ RUN rm -r /var/lib/apt/lists/*
19
+
20
+ # Xdebug for coverage report
21
+ RUN pecl install xdebug-2.6.1
22
+
23
+ RUN echo "memory_limit=1024M" >> /usr/local/etc/php/conf.d/memory-limit.ini
24
+ RUN echo "date.timezone=UTC" >> /usr/local/etc/php/conf.d/timezone.ini
25
+
26
+ # Install and setup composer
27
+ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
28
+ ENV COMPOSER_HOME /root/composer
29
+
30
+ # Add composer bin to the environment
31
+ ENV PATH=/root/composer/vendor/bin:$PATH
32
+
33
+ COPY composer.json /root/composer/
34
+
35
+ RUN composer global remove --no-update phpdocumentor/phpdocumentor -vvv
36
+ RUN composer global require --no-update friendsofphp/php-cs-fixer:^2.0
37
+
38
+ # Install development tools, prefer source removed as automatic fallback now
39
+ RUN composer global install -vvv
Original file line number Diff line number Diff line change 13
13
],
14
14
"require" : {
15
15
"php" : " ^7.0" ,
16
+ "phpdocumentor/phpdocumentor" : " ^2.9" ,
16
17
"mayflower/php-codebrowser" : " ~1.1" ,
17
18
"pdepend/pdepend" : " ^2.5" ,
18
19
"phploc/phploc" : " ^4.0" ,
You can’t perform that action at this time.
0 commit comments