Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import Db/Table package and get tests passing #665

Merged
merged 5 commits into from
Dec 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,15 @@ jobs:
ports:
- 5432:5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: pg-password
PGPASSWORD: pg-password
POSTGRES_DB: cakephp_test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5

steps:
- uses: actions/checkout@v4
Expand All @@ -49,9 +56,11 @@ jobs:

- name: Setup Postgres
if: matrix.db-type == 'pgsql'
env:
PGUSER: postgres
PGPASSWORD: pg-password
run: |
export PGPASSWORD='pg-password'
psql -h 127.0.0.1 -U postgres -c 'CREATE DATABASE "cakephp_snapshot";'
psql -h 127.0.0.1 -c 'CREATE DATABASE "cakephp_snapshot";'

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
4 changes: 3 additions & 1 deletion src/Command/BakeSeedCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,11 @@ public function templateData(Arguments $arguments): array
*/
public function bake(string $name, Arguments $args, ConsoleIo $io): void
{
/** @var array<string, bool|string|null> $options */
$options = array_merge($args->getOptions(), ['no-test' => true]);
$newArgs = new Arguments(
$args->getArguments(),
['no-test' => true] + $args->getOptions(),
$options,
['name']
);
$this->_name = $name;
Expand Down
Loading