mirror of
https://github.com/smarty-php/smarty.git
synced 2025-09-25 20:00:54 +02:00
add local testrunners for all supported PHP versions using docker.
This commit is contained in:
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -10,8 +10,8 @@
|
|||||||
/demo export-ignore
|
/demo export-ignore
|
||||||
/docs export-ignore
|
/docs export-ignore
|
||||||
/utilities export-ignore
|
/utilities export-ignore
|
||||||
|
/docker-compose.yml export-ignore
|
||||||
/.github export-ignore
|
/.github export-ignore
|
||||||
|
|
||||||
/.gitattributes export-ignore
|
/.gitattributes export-ignore
|
||||||
/.gitignore export-ignore
|
/.gitignore export-ignore
|
||||||
/make-release.sh export-ignore
|
/make-release.sh export-ignore
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -5,7 +5,6 @@
|
|||||||
lexer/*.php
|
lexer/*.php
|
||||||
lexer/*.php.bak
|
lexer/*.php.bak
|
||||||
lexer/*.out
|
lexer/*.out
|
||||||
utilies/*.php
|
|
||||||
|
|
||||||
# Dev
|
# Dev
|
||||||
phpunit*
|
phpunit*
|
||||||
|
39
docker-compose.yml
Normal file
39
docker-compose.yml
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
version: "2"
|
||||||
|
services:
|
||||||
|
base:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
volumes:
|
||||||
|
- .:/app
|
||||||
|
working_dir: /app
|
||||||
|
entrypoint: sh ./utilities/testrunners/run-test.sh
|
||||||
|
php71:
|
||||||
|
extends:
|
||||||
|
service: base
|
||||||
|
build:
|
||||||
|
dockerfile: ./utilities/testrunners/php71/Dockerfile
|
||||||
|
php72:
|
||||||
|
extends:
|
||||||
|
service: base
|
||||||
|
build:
|
||||||
|
dockerfile: ./utilities/testrunners/php72/Dockerfile
|
||||||
|
php73:
|
||||||
|
extends:
|
||||||
|
service: base
|
||||||
|
build:
|
||||||
|
dockerfile: ./utilities/testrunners/php73/Dockerfile
|
||||||
|
php74:
|
||||||
|
extends:
|
||||||
|
service: base
|
||||||
|
build:
|
||||||
|
dockerfile: ./utilities/testrunners/php74/Dockerfile
|
||||||
|
php80:
|
||||||
|
extends:
|
||||||
|
service: base
|
||||||
|
build:
|
||||||
|
dockerfile: ./utilities/testrunners/php80/Dockerfile
|
||||||
|
php81:
|
||||||
|
extends:
|
||||||
|
service: base
|
||||||
|
build:
|
||||||
|
dockerfile: ./utilities/testrunners/php81/Dockerfile
|
10
utilities/testrunners/php71/Dockerfile
Normal file
10
utilities/testrunners/php71/Dockerfile
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
FROM php:7.1-cli
|
||||||
|
|
||||||
|
## Basic utilities
|
||||||
|
RUN apt-get update -yqq && apt-get install -y curl apt-utils git zip unzip
|
||||||
|
|
||||||
|
## Composer
|
||||||
|
COPY ./utilities/testrunners/shared/install-composer.sh /root/install-composer.sh
|
||||||
|
WORKDIR /root
|
||||||
|
RUN sh ./install-composer.sh
|
||||||
|
RUN mv ./composer.phar /usr/local/bin/composer
|
10
utilities/testrunners/php72/Dockerfile
Normal file
10
utilities/testrunners/php72/Dockerfile
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
FROM php:7.2-cli
|
||||||
|
|
||||||
|
## Basic utilities
|
||||||
|
RUN apt-get update -yqq && apt-get install -y curl apt-utils git zip unzip
|
||||||
|
|
||||||
|
## Composer
|
||||||
|
COPY ./utilities/testrunners/shared/install-composer.sh /root/install-composer.sh
|
||||||
|
WORKDIR /root
|
||||||
|
RUN sh ./install-composer.sh
|
||||||
|
RUN mv ./composer.phar /usr/local/bin/composer
|
10
utilities/testrunners/php73/Dockerfile
Normal file
10
utilities/testrunners/php73/Dockerfile
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
FROM php:7.3-cli
|
||||||
|
|
||||||
|
## Basic utilities
|
||||||
|
RUN apt-get update -yqq && apt-get install -y curl apt-utils git zip unzip
|
||||||
|
|
||||||
|
## Composer
|
||||||
|
COPY ./utilities/testrunners/shared/install-composer.sh /root/install-composer.sh
|
||||||
|
WORKDIR /root
|
||||||
|
RUN sh ./install-composer.sh
|
||||||
|
RUN mv ./composer.phar /usr/local/bin/composer
|
10
utilities/testrunners/php74/Dockerfile
Normal file
10
utilities/testrunners/php74/Dockerfile
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
FROM php:7.4-cli
|
||||||
|
|
||||||
|
## Basic utilities
|
||||||
|
RUN apt-get update -yqq && apt-get install -y curl apt-utils git zip unzip
|
||||||
|
|
||||||
|
## Composer
|
||||||
|
COPY ./utilities/testrunners/shared/install-composer.sh /root/install-composer.sh
|
||||||
|
WORKDIR /root
|
||||||
|
RUN sh ./install-composer.sh
|
||||||
|
RUN mv ./composer.phar /usr/local/bin/composer
|
10
utilities/testrunners/php80/Dockerfile
Normal file
10
utilities/testrunners/php80/Dockerfile
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
FROM php:8.0-cli
|
||||||
|
|
||||||
|
## Basic utilities
|
||||||
|
RUN apt-get update -yqq && apt-get install -y curl apt-utils git zip unzip
|
||||||
|
|
||||||
|
## Composer
|
||||||
|
COPY ./utilities/testrunners/shared/install-composer.sh /root/install-composer.sh
|
||||||
|
WORKDIR /root
|
||||||
|
RUN sh ./install-composer.sh
|
||||||
|
RUN mv ./composer.phar /usr/local/bin/composer
|
10
utilities/testrunners/php81/Dockerfile
Normal file
10
utilities/testrunners/php81/Dockerfile
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
FROM php:8.1-cli
|
||||||
|
|
||||||
|
## Basic utilities
|
||||||
|
RUN apt-get update -yqq && apt-get install -y curl apt-utils git zip unzip
|
||||||
|
|
||||||
|
## Composer
|
||||||
|
COPY ./utilities/testrunners/shared/install-composer.sh /root/install-composer.sh
|
||||||
|
WORKDIR /root
|
||||||
|
RUN sh ./install-composer.sh
|
||||||
|
RUN mv ./composer.phar /usr/local/bin/composer
|
2
utilities/testrunners/run-test.sh
Executable file
2
utilities/testrunners/run-test.sh
Executable file
@@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
composer update && php ./vendor/phpunit/phpunit/phpunit
|
17
utilities/testrunners/shared/install-composer.sh
Normal file
17
utilities/testrunners/shared/install-composer.sh
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')"
|
||||||
|
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
||||||
|
ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")"
|
||||||
|
|
||||||
|
if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ]
|
||||||
|
then
|
||||||
|
>&2 echo 'ERROR: Invalid installer checksum'
|
||||||
|
rm composer-setup.php
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
php composer-setup.php --quiet
|
||||||
|
RESULT=$?
|
||||||
|
rm composer-setup.php
|
||||||
|
exit $RESULT
|
Reference in New Issue
Block a user