Clean up references to travis in all tests

This commit is contained in:
Kijin Sung 2021-03-12 20:53:40 +09:00
parent 1a824ae652
commit 715e8d781c
3 changed files with 8 additions and 25 deletions

View file

@ -16,14 +16,10 @@ jobs:
with:
php-version: ${{ matrix.php }}
- name: Start MySQL
run: sudo systemctl start mysql.service
- name: Create MySQL database and user
- name: Start MySQL and create database
run: |
sudo systemctl start mysql.service
sudo mysql -uroot -proot -e "CREATE DATABASE rhymix CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci"
sudo mysql -uroot -proot -e "CREATE USER travis@localhost IDENTIFIED WITH mysql_native_password BY 'travis'"
sudo mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON rhymix.* TO travis@localhost; FLUSH PRIVILEGES"
- name: PHP Lint
run: if find . -name "*.php" ! -path "./vendor/*" -print0 | xargs -0 -n 1 -P 8 php -l | grep -v "No syntax errors detected"; then exit 1; fi
@ -42,4 +38,4 @@ jobs:
- name: Build and run codeception
run: |
php codecept.phar build
php codecept.phar run --debug --fail-fast --env travis
php codecept.phar run --debug --fail-fast

View file

@ -33,7 +33,7 @@ class installController extends install
$config = Context::gets('db_type', 'db_host', 'db_port', 'db_user', 'db_pass', 'db_database', 'db_prefix');
// Disallow installation using the root account.
if (trim($config->db_user) === 'root')
if (trim($config->db_user) === 'root' && !preg_match('/Development Server$/', $_SERVER['SERVER_SOFTWARE']))
{
return new BaseObject(-1, 'msg_dbroot_disallowed');
}

View file

@ -8,23 +8,10 @@ modules:
CURLOPT_TIMEOUT: 180
DbDropTablesHelper:
dsn: 'mysql:host=localhost;dbname=rhymix'
user: 'travis'
password: 'travis'
user: 'root'
password: 'root'
Db:
dsn: 'mysql:host=localhost;dbname=rhymix'
user: 'travis'
password: 'travis'
user: 'root'
password: 'root'
cleanup: true
env:
travis:
modules:
config:
Db:
dsn: 'mysql:host=localhost;dbname=rhymix'
user: 'travis'
password: 'travis'
cleanup: true
DbDropTablesHelper:
dsn: 'mysql:host=localhost;dbname=rhymix'
user: 'travis'
password: 'travis'