-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* maint/php84 Updated `.github/workflows/test.yml`. * maint/php84 Updated `.gitignore`. * maint/php84 Updated `SECURITY.md`. * maint/php84 Updated `composer.json`. * maint/php84 Updated `docker-compose.yml`. * maint/php84 Created `docker/php84/Dockerfile`. * maint/php84 Created `docker/php84/php.ini`. * maint/php84 Updated `src/Omdb.php`. * maint/php84 Updated `test.sh`. --------- Co-authored-by: david_smith <david_smith@sweetwater.com>
- Loading branch information
1 parent
e365b1e
commit 677e5b1
Showing
9 changed files
with
88 additions
and
26 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
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
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM php:8.4-cli AS base | ||
|
||
WORKDIR /app | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
git \ | ||
unzip \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
FROM base AS composer | ||
|
||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | ||
|
||
FROM base AS debug | ||
|
||
RUN pecl channel-update pecl.php.net && \ | ||
pecl install xdebug && \ | ||
docker-php-ext-enable xdebug && \ | ||
echo "xdebug.mode=coverage" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini | ||
|
||
WORKDIR /app | ||
|
||
CMD ["bash"] |
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 @@ | ||
zend_extension = xdebug.so | ||
xdebug.mode = coverage |
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 |
---|---|---|
@@ -1,21 +1,12 @@ | ||
# run-tests.sh | ||
#!/bin/bash | ||
set -e | ||
|
||
php_versions=("php83" "php82" "php81") | ||
php_versions=("php84" "php83" "php82" "php81") | ||
|
||
for version in "${php_versions[@]}"; do | ||
if [ -f composer.lock ]; then | ||
echo "removing composer.lock" | ||
rm composer.lock | ||
fi | ||
|
||
docker compose run --rm "$version"composer composer install | ||
docker compose run --rm "${version}composer" composer update --no-cache | ||
|
||
echo "Running tests on $version..." | ||
if ! docker compose run --rm "$version" vendor/bin/phpunit; then | ||
echo "Tests failed on $version." | ||
exit 1 | ||
fi | ||
done | ||
|
||
echo "All tests passed!" | ||
done |