File tree Expand file tree Collapse file tree 3 files changed +24
-6
lines changed Expand file tree Collapse file tree 3 files changed +24
-6
lines changed Original file line number Diff line number Diff line change 1
1
ARG PHP_VERSION=7.4-cli
2
2
FROM php:${PHP_VERSION}
3
3
4
+ WORKDIR /usr/src/app
5
+
4
6
# Install git
5
7
RUN apt-get update && \
6
8
apt-get install -y --no-install-recommends git
@@ -15,4 +17,19 @@ RUN apt-get install -y \
15
17
RUN php -v
16
18
17
19
# Install composer
18
- RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
20
+ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
21
+
22
+ # Print composer version
23
+ RUN composer --version
24
+
25
+ COPY composer.json .
26
+
27
+ # Install dependencies with composer
28
+ RUN composer global require hirak/prestissimo && composer install
29
+
30
+ COPY . .
31
+
32
+ # Updating elasticsearch submodule
33
+ RUN git submodule update --init --recursive
34
+
35
+ CMD ["bash" , ".ci/yaml-tests.sh" ]
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ echo -e "\033[34;1mINFO:\033[0m PHP_VERSION ${PHP_VERSION}\033[0m"
22
22
echo -e " \033[1m>>>>> Build docker container >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
23
23
24
24
docker build \
25
+ --no-cache \
25
26
--file .ci/Dockerfile \
26
27
--tag elastic/elasticsearch-php \
27
28
--build-arg PHP_VERSION=${PHP_VERSION} \
@@ -33,13 +34,12 @@ repo=$(realpath $(dirname $(realpath -s $0))/../)
33
34
34
35
docker run \
35
36
--network=${network_name} \
36
- --volume $repo : /usr/src/app \
37
+ --workdir= " /usr/src/app" \
37
38
--env STACK_VERSION=${STACK_VERSION} \
38
39
--env TEST_SUITE=${TEST_SUITE} \
39
40
--env PHP_VERSION=${PHP_VERSION} \
40
41
--env ELASTICSEARCH_URL=${ELASTICSEARCH_URL} \
41
42
--ulimit nofile=65535:65535 \
42
43
--name elasticsearch-php \
43
44
--rm \
44
- elastic/elasticsearch-php
45
- /bin/bash .ci/yaml-tests.sh
45
+ elastic/elasticsearch-php
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
- composer install
4
- git submodule update --init --recursive
3
+ # Checkout the YAML test from Elasticsearch tag
5
4
php util/RestSpecRunner.php
5
+
6
+ # Run YAML tests
6
7
vendor/bin/phpunit -c phpunit-integration.xml --group sync
You can’t perform that action at this time.
0 commit comments