File tree Expand file tree Collapse file tree 4 files changed +22
-4
lines changed
Expand file tree Collapse file tree 4 files changed +22
-4
lines changed Original file line number Diff line number Diff line change 1+ ARG PHP_RUNTIME=8.1
2+
13FROM php:8.1-cli AS builder
24WORKDIR /src
35RUN apt-get update && apt-get install -y unzip git jq \
@@ -12,7 +14,7 @@ RUN composer install --no-dev --optimize-autoloader && \
1214 mkdir -p /build_out && \
1315 composer archive --format=tar --dir=/build_out
1416
15- FROM php:8.1 -cli
17+ FROM php:${PHP_RUNTIME} -cli
1618WORKDIR /app
1719RUN apt-get update && apt-get install -y unzip git libzip-dev \
1820 && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
Original file line number Diff line number Diff line change @@ -46,4 +46,19 @@ reconnect-test: build
4646 -e API_PASSPHRASE=" $$ API_PASSPHRASE" \
4747 --name php-reconnect-test --network isolated_net \
4848 php-sdk-image:latest \
49- bash /app/ws_reconnect_test.sh
49+ bash /app/ws_reconnect_test.sh
50+
51+
52+ VERSIONS = 7.4 8.0 8.1 8.2
53+ .PHONY : php-version-test
54+ php-version-test :
55+ @for v in $(VERSIONS ) ; do \
56+ echo "---- PHP $$v ----"; \
57+ docker build --build-arg PHP_RUNTIME=$$v -t php-sdk-image :$$v . ; \
58+ docker run --rm \
59+ -e API_KEY="$$API_KEY" \
60+ -e API_SECRET="$$API_SECRET" \
61+ -e API_PASSPHRASE="$$API_PASSPHRASE" \
62+ -e USE_LOCAL="true" \
63+ php-sdk-image :$$v bash /app/release_test.sh || exit $$? ; \
64+ done
Original file line number Diff line number Diff line change 2323 }
2424 ],
2525 "require" : {
26- "php" : " >= 7.4" ,
26+ "php" : " ^ 7.4 || ^8.0 " ,
2727 "jms/serializer" : " ^3.32" ,
2828 "doctrine/annotations" : " ^2.0" ,
2929 "guzzlehttp/guzzle" : " ^7.9" ,
Original file line number Diff line number Diff line change 2525 composer require kucoin/kucoin-universal-sdk
2626fi
2727
28- cat composer.json
28+ echo " Echo depends..."
29+ composer depends php
2930
3031echo " Running service scripts..."
3132cp /src/tests/regression/RunServiceTest.php /app
You can’t perform that action at this time.
0 commit comments