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 11ARG PHP_VERSION=7.4-cli
22FROM php:${PHP_VERSION}
33
4+ WORKDIR /usr/src/app
5+
46# Install git
57RUN apt-get update && \
68 apt-get install -y --no-install-recommends git
@@ -15,4 +17,19 @@ RUN apt-get install -y \
1517RUN php -v
1618
1719# 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"
2222echo -e " \033[1m>>>>> Build docker container >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
2323
2424docker 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
3435docker 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- /bin/bash .ci/yaml-tests.sh
45+ elastic/elasticsearch-php
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3- composer install
4- git submodule update --init --recursive
3+ # Checkout the YAML test from Elasticsearch tag
54php util/RestSpecRunner.php
5+
6+ # Run YAML tests
67vendor/bin/phpunit -c phpunit-integration.xml --group sync
You can’t perform that action at this time.
0 commit comments