Skip to content

Commit

Permalink
Use CONFIG constant on schema seed command
Browse files Browse the repository at this point in the history
  • Loading branch information
raul338 committed Apr 20, 2021
1 parent 898f5f8 commit 32149dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@ jobs:
if [[ ${{ matrix.db-type }} == 'mysql' && ${{ matrix.php-version }} == '7.2' ]]; then export DB_URL='mysql://root:root@127.0.0.1/cakephp?encoding=utf8'; fi
if [[ ${{ matrix.db-type }} == 'mariadb' ]]; then export DB_URL='mysql://root:root@127.0.0.1/cakephp'; fi
if [[ ${{ matrix.db-type }} == 'pgsql' ]]; then export DB_URL='postgres://postgres:postgres@127.0.0.1/postgres'; fi
if [[ ${{ matrix.php-version }} == '7.4' && ${{ matrix.db-type }} == 'mysql' ]]; then
if [[ ${{ matrix.php-version }} == '7.4' ]]; then
vendor/bin/phpunit --verbose --coverage-clover coverage.xml
else
vendor/bin/phpunit --verbose
fi
- name: Submit code coverage
if: matrix.php-version == '7.4' && matrix.db-type == 'mysql'
if: matrix.php-version == '7.4'
uses: codecov/codecov-action@v1
cs-stan:
name: Coding Standard & Static Analysis
Expand Down
5 changes: 2 additions & 3 deletions src/Command/SeedCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function execute(Arguments $args, ConsoleIo $io)
{
$this->_config = [
'connection' => $args->getOption('connection'),
'seed' => $args->getOption('seed'),
'seed' => $args->getOption('seed') ?: CONFIG . 'seed.php',
'truncate' => filter_var($args->getOption('truncate'), FILTER_VALIDATE_BOOLEAN),
'no-interaction' => filter_var($args->getOption('no-interaction'), FILTER_VALIDATE_BOOLEAN),
];
Expand Down Expand Up @@ -303,9 +303,8 @@ public function buildOptionParser(ConsoleOptionParser $parser): ConsoleOptionPar
'short' => 'c',
])
->addOption('seed', [
'help' => 'Path to the seed.php file.',
'help' => 'Path to the seed.php file. Defaults to CONFIG . "seed.php"',
'short' => 's',
'default' => 'config/seed.php',
])
->addOption('truncate', [
'help' => 'Truncate tables before seeding.',
Expand Down

0 comments on commit 32149dd

Please sign in to comment.