Skip to content

Commit

Permalink
Use Travis MySql credentials in github actions, so they can both can …
Browse files Browse the repository at this point in the history
…be used
  • Loading branch information
danon committed May 15, 2021
1 parent 3014e07 commit 861218b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ jobs:
image: mysql:8
env:
MYSQL_DATABASE: ouzo_test
MYSQL_USER: ouzo_user
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: password
# Set health checks to wait until mysql has started
options: --health-cmd="mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 5
Expand Down Expand Up @@ -62,7 +60,9 @@ jobs:

- name: Seed database (MySQL)
if: "${{ matrix.db == 'MySQL' }}"
run: cat test/test-db/recreate_schema_mysql.sql | mysql -h 127.0.0.1 -u root -ppassword ouzo_test
run: |
mysql -h 127.0.0.1 -u root -ppassword -e "CREATE USER travis; GRANT ALL ON *.* TO travis;"
cat test/test-db/recreate_schema_mysql.sql | mysql -h 127.0.0.1 -u root -ppassword ouzo_test
- name: Seed database (SQLite)
if: "${{ matrix.db == 'SQLite' }}"
Expand Down
4 changes: 2 additions & 2 deletions config/test/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
$db = getenv('db');
if ($db == 'mysql') {
$config['sql_dialect'] = MySqlDialect::class;
$config['db']['user'] = 'ouzo_user';
$config['db']['pass'] = 'password';
$config['db']['user'] = 'travis';
$config['db']['pass'] = '';
$config['db']['driver'] = 'mysql';
$config['db']['host'] = '127.0.0.1';
$config['db']['port'] = '3306';
Expand Down

0 comments on commit 861218b

Please sign in to comment.