Skip to content

Commit

Permalink
fix(#127): Add MariaDB in CI test workflow
Browse files Browse the repository at this point in the history
also test sqla-h with MariaDB, ran tests locally and tests didn't
fail with MariaDB probably because it is very similar to MySQL
DB.
  • Loading branch information
indiVar0508 committed Jan 25, 2024
1 parent a173129 commit 579c201
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,20 @@ jobs:
- ">=1.4,<2"
- ">=2"
services:
mariadb:
image: mariadb
ports:
# Mysql is exposed to same port
- 3307:3306
env:
MARIADB_DATABASE: sqlalchemy_history_test
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: 1
options: >-
--health-cmd "healthcheck.sh --connect --innodb_initialized"
--health-interval 10s
--health-timeout 5s
--health-retries 3
mysql:
image: mysql
ports:
Expand Down
2 changes: 2 additions & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ def get_dns_from_driver(driver): # pragma: no cover
return "mssql+pymssql://sa:MSsql2022@localhost:1433"
elif driver == "oracle":
return "oracle+cx_oracle://SYSTEM:Oracle2022@localhost:1521"
elif driver == "mariadb":
return "mysql+pymysql://root@localhost:3307/sqlalchemy_history_test"
else:
raise Exception("Unknown driver given: %r" % driver)

Expand Down

0 comments on commit 579c201

Please sign in to comment.