Skip to content

Commit

Permalink
dev: Make sure database is initialized on the CI
Browse files Browse the repository at this point in the history
There was a "critical" error when running tests against the PGSQL
database:

> [critical] Error thrown while running command "dbal:run-sql
> --connection=default 'SELECT pid, pg_terminate_backend(pid) FROM
> pg_stat_activity WHERE datname = current_database() AND pid <>
> pg_backend_pid()'". Message: "An exception occurred in the driver:
> SQLSTATE[08006] [7] connection to server at "127.0.0.1", port 5432
> failed: FATAL:  database "bileto_test" does not exist"

In fact, this error didn't prevent the tests to be run, but it bothered
me.
  • Loading branch information
marien-probesys committed Mar 13, 2024
1 parent 2890d74 commit f8036d9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: bileto_test
ports:
- 5432:5432
options: >-
Expand Down Expand Up @@ -81,6 +82,7 @@ jobs:
- 3306:3306
env:
MARIADB_ROOT_PASSWORD: mariadb
MARIADB_DATABASE: bileto_test
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
Expand Down

0 comments on commit f8036d9

Please sign in to comment.