File tree Expand file tree Collapse file tree 5 files changed +25
-10
lines changed Expand file tree Collapse file tree 5 files changed +25
-10
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
- # Create app directory
5
4
WORKDIR /usr/src/app
6
5
7
6
# Install git
@@ -14,8 +13,23 @@ RUN apt-get install -y \
14
13
zip \
15
14
&& docker-php-ext-install zip
16
15
16
+ # Print PHP version
17
+ RUN php -v
18
+
17
19
# Install composer
18
20
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
19
21
20
- # Install prestissimo pluing for composer
21
- RUN composer global require hirak/prestissimo
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
- $script_path /run-yaml-tests.sh
45
+ elastic/elasticsearch-php
Original file line number Diff line number Diff line change @@ -20,4 +20,4 @@ if [[ -n "$RUNSCRIPTS" ]]; then
20
20
fi
21
21
22
22
echo -e " \033[1m>>>>> Repository specific tests >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
23
- bash .ci/run-repository.sh
23
+ bash .ci/run-repository.sh
Original file line number Diff line number Diff line change 1
1
---
2
2
STACK_VERSION :
3
- - 8.0.0 -SNAPSHOT
3
+ - 7.6 -SNAPSHOT
4
4
5
5
PHP_VERSION :
6
6
- 7.4-cli
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