-
Notifications
You must be signed in to change notification settings - Fork 711
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add local testrunners for all supported PHP versions using docker.
- Loading branch information
Showing
11 changed files
with
119 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
lexer/*.php | ||
lexer/*.php.bak | ||
lexer/*.out | ||
utilies/*.php | ||
|
||
# Dev | ||
phpunit* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
composer update && php ./vendor/phpunit/phpunit/phpunit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |