mirror of
https://github.com/elyby/accounts.git
synced 2025-01-11 06:22:16 +05:30
Восстановлена работа php тестов
This commit is contained in:
parent
c162a46e62
commit
0468076548
@ -2,7 +2,7 @@
|
||||
|
||||
cd /var/www/html
|
||||
|
||||
if [ "$1" = 'bash' ]
|
||||
if [ "$1" = "bash" ] || [ "$1" = "composer" ]
|
||||
then
|
||||
exec "$@"
|
||||
exit 0
|
||||
@ -28,6 +28,11 @@ then
|
||||
cp -r ./../dist ./frontend/dist
|
||||
fi
|
||||
|
||||
wait-for-it db:3306 -- "./yii migrate/up --interactive=0"
|
||||
if [ "$YII_ENV" != "test" ]
|
||||
then
|
||||
wait-for-it db:3306 -- "php /var/www/html/yii migrate/up --interactive=0"
|
||||
else
|
||||
wait-for-it testdb:3306 -- "php /var/www/html/tests/codeception/bin/yii migrate/up --interactive=0"
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
|
@ -1,17 +1,26 @@
|
||||
version: '2'
|
||||
services:
|
||||
testphp:
|
||||
extends:
|
||||
file: ../docker-compose.dev.yml
|
||||
service: app
|
||||
container_name: accountelyby_testphp
|
||||
build:
|
||||
context: ../
|
||||
dockerfile: Dockerfile-dev
|
||||
depends_on:
|
||||
- testdb
|
||||
- testredis
|
||||
- testrabbit
|
||||
volumes:
|
||||
- ./../:/var/www/html/
|
||||
env_file: ./../.env
|
||||
environment:
|
||||
- YII_DEBUG=true
|
||||
- YII_ENV=test
|
||||
# Это я потом, когда-нибудь, уберу
|
||||
- XDEBUG_CONFIG=remote_host=10.254.254.254
|
||||
- PHP_IDE_CONFIG=serverName=docker
|
||||
|
||||
testdb:
|
||||
extends:
|
||||
file: ../docker-compose.dev.yml
|
||||
service: db
|
||||
container_name: accountelyby_testdb
|
||||
build: ./../docker/mariadb
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: ""
|
||||
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
|
||||
@ -20,14 +29,12 @@ services:
|
||||
MYSQL_PASSWORD: "ely_accounts_tester_password"
|
||||
|
||||
testredis:
|
||||
extends:
|
||||
file: ../docker-compose.dev.yml
|
||||
service: redis
|
||||
container_name: accountelyby_testredis
|
||||
image: redis:3.0-alpine
|
||||
|
||||
testrabbit:
|
||||
extends:
|
||||
file: ../docker-compose.dev.yml
|
||||
service: rabbitmq
|
||||
container_name: accountelyby_testrabbit
|
||||
image: rabbitmq:3.6
|
||||
environment:
|
||||
RABBITMQ_DEFAULT_USER: "ely-accounts-tester"
|
||||
RABBITMQ_DEFAULT_PASS: "tester-password"
|
||||
|
@ -3,6 +3,4 @@
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
./../vendor/bin/codecept build
|
||||
|
||||
./../docker/wait-for-it.sh testdb:3306 testrabbit:5672 -- \
|
||||
php codeception/bin/yii migrate/up --interactive=0 && ./../vendor/bin/codecept run $*
|
||||
./../vendor/bin/codecept run $*
|
||||
|
Loading…
x
Reference in New Issue
Block a user