From 2f9b26a0c6f987b748703e6779980865144b8e80 Mon Sep 17 00:00:00 2001 From: resurtm Date: Tue, 20 Dec 2016 21:18:35 +0600 Subject: [PATCH] travis ci wip --- .travis.yml | 6 +++--- tests/_app/config/console.php | 9 +++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 918fa21..33d1691 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,9 +38,9 @@ before_script: # initialize database - mysql -e 'CREATE DATABASE `yii2-usuario-test`;'; - #- mysql -e "CREATE USER 'travis'@'localhost' IDENTIFIED WITH mysql_native_password;"; - #- mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'travis'@'localhost' WITH GRANT OPTION;"; - - mysql -u root "yii2-usuario-test" < tests/data/schema.sql + - mysql -e "CREATE USER 'travis'@'localhost' IDENTIFIED WITH mysql_native_password;"; + - mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'travis'@'localhost' WITH GRANT OPTION;"; + - php tests/_app/yii.php migrate/up --interactive=0 script: - composer validate --no-check-lock diff --git a/tests/_app/config/console.php b/tests/_app/config/console.php index c88ff61..f495daa 100644 --- a/tests/_app/config/console.php +++ b/tests/_app/config/console.php @@ -12,4 +12,13 @@ return [ 'cache' => null, 'db' => require __DIR__.'/db.php', ], + 'controllerMap' => [ + 'migrate' => [ + 'class' => \yii\console\controllers\MigrateController::class, + 'migrationPath' => null, + 'migrationNamespaces' => [ + 'Da\User\Migration', + ], + ], + ], ];