Skip to content

Commit e65bf1e

Browse files
committed
Add docker test runner script
1 parent 5d11e30 commit e65bf1e

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

docker/test_runner.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env bash
2+
3+
cd /opt/php
4+
5+
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
6+
php -r "if (hash_file('SHA384', 'composer-setup.php') === '669656bab3166a7aff8a7506b8cb2d1c292f042046c5a994c43155c0be6190fa0355160742ab2e1c88d40d5be660b410') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
7+
php composer-setup.php
8+
php -r "unlink('composer-setup.php');"
9+
10+
php composer.phar install --prefer-dist --no-interaction
11+
12+
ls -la ./vendor/bin
13+
14+
if ./vendor/bin/phpunit; then
15+
echo "Tests passed successfully!"
16+
exit 0
17+
else
18+
echo "Tests failed :("
19+
exit 1
20+
fi

0 commit comments

Comments
 (0)