|
|
@ -26,7 +26,7 @@ test: |
|
|
|
script: |
|
|
|
script: |
|
|
|
- docker-compose up -d |
|
|
|
- docker-compose up -d |
|
|
|
- docker-compose run --rm php vendor/bin/phpunit -v --exclude caching,db |
|
|
|
- docker-compose run --rm php vendor/bin/phpunit -v --exclude caching,db |
|
|
|
- docker-compose down -v |
|
|
|
- docker-compose down -v --remove-orphans |
|
|
|
|
|
|
|
|
|
|
|
test:caching: |
|
|
|
test:caching: |
|
|
|
stage: test |
|
|
|
stage: test |
|
|
@ -36,7 +36,7 @@ test:caching: |
|
|
|
# wait for mysql (retry 30 times) |
|
|
|
# wait for mysql (retry 30 times) |
|
|
|
- docker-compose run --rm php bash -c "while ! curl mysql:3306; do ((c++)) && ((c==30)) && break; sleep 2; done" |
|
|
|
- docker-compose run --rm php bash -c "while ! curl mysql:3306; do ((c++)) && ((c==30)) && break; sleep 2; done" |
|
|
|
- docker-compose run --rm php vendor/bin/phpunit -v --group caching |
|
|
|
- docker-compose run --rm php vendor/bin/phpunit -v --group caching |
|
|
|
- docker-compose down -v |
|
|
|
- docker-compose down -v --remove-orphans |
|
|
|
|
|
|
|
|
|
|
|
test:db: |
|
|
|
test:db: |
|
|
|
stage: test |
|
|
|
stage: test |
|
|
@ -44,7 +44,7 @@ test:db: |
|
|
|
- export COMPOSE_PROJECT_NAME=${ISOLATION}db |
|
|
|
- export COMPOSE_PROJECT_NAME=${ISOLATION}db |
|
|
|
- docker-compose up -d |
|
|
|
- docker-compose up -d |
|
|
|
- docker-compose run --rm php vendor/bin/phpunit -v --group db --exclude caching,mysql,pgsql,mssql,cubrid |
|
|
|
- docker-compose run --rm php vendor/bin/phpunit -v --group db --exclude caching,mysql,pgsql,mssql,cubrid |
|
|
|
- docker-compose down -v |
|
|
|
- docker-compose down -v --remove-orphans |
|
|
|
|
|
|
|
|
|
|
|
test:db:mysql: |
|
|
|
test:db:mysql: |
|
|
|
stage: test |
|
|
|
stage: test |
|
|
@ -54,7 +54,7 @@ test:db:mysql: |
|
|
|
# wait for db (retry X times) |
|
|
|
# wait for db (retry X times) |
|
|
|
- docker-compose run --rm php bash -c "while ! curl mysql:3306; do ((c++)) && ((c==30)) && break; sleep 2; done" |
|
|
|
- docker-compose run --rm php bash -c "while ! curl mysql:3306; do ((c++)) && ((c==30)) && break; sleep 2; done" |
|
|
|
- docker-compose run --rm php vendor/bin/phpunit -v --group mysql |
|
|
|
- docker-compose run --rm php vendor/bin/phpunit -v --group mysql |
|
|
|
- docker-compose down -v |
|
|
|
- docker-compose down -v --remove-orphans |
|
|
|
|
|
|
|
|
|
|
|
test:db:pgsql: |
|
|
|
test:db:pgsql: |
|
|
|
stage: test |
|
|
|
stage: test |
|
|
@ -64,7 +64,7 @@ test:db:pgsql: |
|
|
|
# wait for db (retry X times) |
|
|
|
# wait for db (retry X times) |
|
|
|
- docker-compose run --rm php bash -c 'while [ true ]; do curl postgres:5432; if [ $? == 52 ]; then break; fi; ((c++)) && ((c==25)) && break; sleep 2; done' |
|
|
|
- docker-compose run --rm php bash -c 'while [ true ]; do curl postgres:5432; if [ $? == 52 ]; then break; fi; ((c++)) && ((c==25)) && break; sleep 2; done' |
|
|
|
- docker-compose run --rm php vendor/bin/phpunit -v --group pgsql |
|
|
|
- docker-compose run --rm php vendor/bin/phpunit -v --group pgsql |
|
|
|
- docker-compose down -v |
|
|
|
- docker-compose down -v --remove-orphans |
|
|
|
|
|
|
|
|
|
|
|
test:db:mssql: |
|
|
|
test:db:mssql: |
|
|
|
stage: test |
|
|
|
stage: test |
|
|
@ -81,7 +81,7 @@ test:db:mssql: |
|
|
|
# Note: Password has to be the last parameter |
|
|
|
# Note: Password has to be the last parameter |
|
|
|
- docker-compose run --rm sqlcmd sqlcmd -S mssql -U sa -Q "CREATE DATABASE yii2test" -P Mircosoft-12345 |
|
|
|
- docker-compose run --rm sqlcmd sqlcmd -S mssql -U sa -Q "CREATE DATABASE yii2test" -P Mircosoft-12345 |
|
|
|
- docker-compose run --rm php vendor/bin/phpunit -v --group mssql |
|
|
|
- docker-compose run --rm php vendor/bin/phpunit -v --group mssql |
|
|
|
- docker-compose down -v |
|
|
|
- docker-compose down -v --remove-orphans |
|
|
|
|
|
|
|
|
|
|
|
test:db:cubrid: |
|
|
|
test:db:cubrid: |
|
|
|
stage: test |
|
|
|
stage: test |
|
|
@ -93,7 +93,7 @@ test:db:cubrid: |
|
|
|
- docker-compose run --rm php bash -c 'while [ true ]; do curl cubrid:1523; if [ $? == 56 ]; then break; fi; ((c++)) && ((c==20)) && break; sleep 3; done' |
|
|
|
- docker-compose run --rm php bash -c 'while [ true ]; do curl cubrid:1523; if [ $? == 56 ]; then break; fi; ((c++)) && ((c==20)) && break; sleep 3; done' |
|
|
|
- sleep 5 |
|
|
|
- sleep 5 |
|
|
|
- docker-compose run --rm php /project/vendor/bin/phpunit -v --group cubrid |
|
|
|
- docker-compose run --rm php /project/vendor/bin/phpunit -v --group cubrid |
|
|
|
- docker-compose down -v |
|
|
|
- docker-compose down -v --remove-orphans |
|
|
|
|
|
|
|
|
|
|
|
test:travis: |
|
|
|
test:travis: |
|
|
|
stage: test |
|
|
|
stage: test |
|
|
@ -105,24 +105,28 @@ test:travis: |
|
|
|
# TODO: retry/wait for db |
|
|
|
# TODO: retry/wait for db |
|
|
|
- sleep 10 |
|
|
|
- sleep 10 |
|
|
|
- docker-compose run --rm php vendor/bin/phpunit -v --exclude mssql,cubrid,oci,wincache,xcache,zenddata,cubrid |
|
|
|
- docker-compose run --rm php vendor/bin/phpunit -v --exclude mssql,cubrid,oci,wincache,xcache,zenddata,cubrid |
|
|
|
- docker-compose down -v |
|
|
|
- docker-compose down -v --remove-orphans |
|
|
|
|
|
|
|
|
|
|
|
cleanup: |
|
|
|
cleanup: |
|
|
|
stage: cleanup |
|
|
|
stage: cleanup |
|
|
|
when: always |
|
|
|
when: always |
|
|
|
script: |
|
|
|
script: |
|
|
|
- docker-compose down -v |
|
|
|
- docker-compose down -v --remove-orphans |
|
|
|
- export COMPOSE_PROJECT_NAME=${ISOLATION}caching |
|
|
|
- export COMPOSE_PROJECT_NAME=${ISOLATION}caching |
|
|
|
- docker-compose down -v |
|
|
|
- docker-compose down -v --remove-orphans |
|
|
|
- export COMPOSE_PROJECT_NAME=${ISOLATION}db |
|
|
|
- export COMPOSE_PROJECT_NAME=${ISOLATION}db |
|
|
|
- docker-compose down -v |
|
|
|
- docker-compose down -v --remove-orphans |
|
|
|
- export COMPOSE_PROJECT_NAME=${ISOLATION}mysql |
|
|
|
- export COMPOSE_PROJECT_NAME=${ISOLATION}mysql |
|
|
|
- docker-compose down -v |
|
|
|
- docker-compose down -v --remove-orphans |
|
|
|
- export COMPOSE_PROJECT_NAME=${ISOLATION}pgsql |
|
|
|
- export COMPOSE_PROJECT_NAME=${ISOLATION}pgsql |
|
|
|
- docker-compose down -v |
|
|
|
- docker-compose down -v --remove-orphans |
|
|
|
|
|
|
|
- export COMPOSE_PROJECT_NAME=${ISOLATION}travis |
|
|
|
|
|
|
|
- docker-compose down -v --remove-orphans |
|
|
|
|
|
|
|
- pushd mssql |
|
|
|
- export COMPOSE_PROJECT_NAME=${ISOLATION}mssql |
|
|
|
- export COMPOSE_PROJECT_NAME=${ISOLATION}mssql |
|
|
|
- docker-compose down -v |
|
|
|
- docker-compose down -v --remove-orphans |
|
|
|
|
|
|
|
- popd |
|
|
|
|
|
|
|
- pushd cubrid |
|
|
|
- export COMPOSE_PROJECT_NAME=${ISOLATION}cubrid |
|
|
|
- export COMPOSE_PROJECT_NAME=${ISOLATION}cubrid |
|
|
|
- docker-compose down -v |
|
|
|
- docker-compose down -v --remove-orphans |
|
|
|
- export COMPOSE_PROJECT_NAME=${ISOLATION}travis |
|
|
|
- popd |
|
|
|
- docker-compose down -v |
|
|
|
|
|
|
|