Skip to content

Commit 453aced

Browse files
committed
add_Codeception
1 parent 7a3c5ef commit 453aced

File tree

7 files changed

+55
-3
lines changed

7 files changed

+55
-3
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
composer.phar
2+
vendor
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
-include ../.env
2+
3+
composer:
4+
./install.sh
5+
6+
update:
7+
php composer.phar update
8+
9+
install:
10+
php composer.phar install
11+
12+
test:
13+
API_KEY=$(API_KEY) php ./vendor/bin/codecept run --steps
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/sh
2+
3+
EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')"
4+
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
5+
ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")"
6+
7+
if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ]
8+
then
9+
>&2 echo 'ERROR: Invalid installer checksum'
10+
rm composer-setup.php
11+
exit 1
12+
fi
13+
14+
php composer-setup.php --quiet
15+
RESULT=$?
16+
rm composer-setup.php
17+
exit $RESULT

php-composer-phpunit/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
composer.phar
12
vendor

php-composer-phpunit/Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
-include ../.env
22

3-
docker:
4-
docker build -t php --build-arg API_KEY=$(API_KEY) . && docker run php
3+
composer:
4+
./install.sh
55

66
update:
77
php composer.phar update
88

9-
test:
9+
install:
1010
php composer.phar install
11+
12+
test:
1113
API_KEY=$(API_KEY) ./vendor/bin/phpunit test

php-composer-phpunit/composer.phar

-1.84 MB
Binary file not shown.

php-composer-phpunit/install.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/sh
2+
3+
EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')"
4+
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
5+
ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")"
6+
7+
if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ]
8+
then
9+
>&2 echo 'ERROR: Invalid installer checksum'
10+
rm composer-setup.php
11+
exit 1
12+
fi
13+
14+
php composer-setup.php --quiet
15+
RESULT=$?
16+
rm composer-setup.php
17+
exit $RESULT

0 commit comments

Comments
 (0)