Skip to content

Commit 4fb6820

Browse files
committed
Merge remote-tracking branch 'elasticsearch-php/7.x'
2 parents db205f9 + d8331a4 commit 4fb6820

File tree

5 files changed

+25
-10
lines changed

5 files changed

+25
-10
lines changed

.ci/Dockerfile

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
ARG PHP_VERSION=7.4-cli
22
FROM php:${PHP_VERSION}
33

4-
# Create app directory
54
WORKDIR /usr/src/app
65

76
# Install git
@@ -14,8 +13,23 @@ RUN apt-get install -y \
1413
zip \
1514
&& docker-php-ext-install zip
1615

16+
# Print PHP version
17+
RUN php -v
18+
1719
# Install composer
1820
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
1921

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"]

.ci/run-repository.sh

100755100644
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ echo -e "\033[34;1mINFO:\033[0m PHP_VERSION ${PHP_VERSION}\033[0m"
2222
echo -e "\033[1m>>>>> Build docker container >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
2323

2424
docker build \
25+
--no-cache \
2526
--file .ci/Dockerfile \
2627
--tag elastic/elasticsearch-php \
2728
--build-arg PHP_VERSION=${PHP_VERSION} \
@@ -33,13 +34,12 @@ repo=$(realpath $(dirname $(realpath -s $0))/../)
3334

3435
docker run \
3536
--network=${network_name} \
36-
--volume $repo:/usr/src/app \
37+
--workdir="/usr/src/app" \
3738
--env STACK_VERSION=${STACK_VERSION} \
3839
--env TEST_SUITE=${TEST_SUITE} \
3940
--env PHP_VERSION=${PHP_VERSION} \
4041
--env ELASTICSEARCH_URL=${ELASTICSEARCH_URL} \
4142
--ulimit nofile=65535:65535 \
4243
--name elasticsearch-php \
4344
--rm \
44-
elastic/elasticsearch-php
45-
$script_path/run-yaml-tests.sh
45+
elastic/elasticsearch-php

.ci/run-tests

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ if [[ -n "$RUNSCRIPTS" ]]; then
2020
fi
2121

2222
echo -e "\033[1m>>>>> Repository specific tests >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
23-
bash .ci/run-repository.sh
23+
bash .ci/run-repository.sh

.ci/test-matrix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
STACK_VERSION:
3-
- 8.0.0-SNAPSHOT
3+
- 7.6-SNAPSHOT
44

55
PHP_VERSION:
66
- 7.4-cli
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env bash
22

3-
composer install
4-
git submodule update --init --recursive
3+
# Checkout the YAML test from Elasticsearch tag
54
php util/RestSpecRunner.php
5+
6+
# Run YAML tests
67
vendor/bin/phpunit -c phpunit-integration.xml --group sync

0 commit comments

Comments
 (0)