From 579c20173ab5c499b0b767998ebc39cb35214044 Mon Sep 17 00:00:00 2001 From: Indivar Mishra Date: Thu, 25 Jan 2024 15:38:27 +0530 Subject: [PATCH] fix(#127): Add MariaDB in CI test workflow 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. --- .github/workflows/main.yml | 14 ++++++++++++++ tests/__init__.py | 2 ++ 2 files changed, 16 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c71ba2b..b9cb716 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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: diff --git a/tests/__init__.py b/tests/__init__.py index d65825a..f849a4a 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -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)