diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 537542d..a24b66c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,6 +28,10 @@ jobs: - 'v6.5.3' - 'v6.1.7' - 'v5.4.3' + - 'v5.3.4' + - 'v5.2.4' + - 'v5.1.5' + - 'v4.0.15' name: test_${{ matrix.python-version }}_tidb_${{ matrix.tidb-version }} runs-on: ubuntu-latest container: diff --git a/README.md b/README.md index 2bcf06e..2be9c95 100644 --- a/README.md +++ b/README.md @@ -25,16 +25,29 @@ from sqlalchemy import create_engine engine = create_engine("tidb://username:password@ip:port/database_name?charset=utf8mb4") ``` -## testing +## Testing this dialect with SQLAlchemy and Alembic + +Bootstrap your environment with virtualenv and requirements installed + +```bash +make bootstrap +``` You can run the tests using the following command: ```bash -tox -# or test for a specified python version +make all +# Or running test with `tox` for a specified python version tox -e py39 +# Or running test directly using `pytest` +pytest "test/test_suite.py::DateTest" ``` +To know more about developing the TiDB dialect, checkout the guide on sqlalchemy: + +* https://github.com/sqlalchemy/sqlalchemy/blob/rel_1_4/README.dialects.rst +* https://github.com/sqlalchemy/sqlalchemy/blob/rel_1_4/README.unittests.rst + ## Known issues - TiDB only support `FOREIGN KEY` constraints since v6.6.0([#18209](https://github.com/pingcap/tidb/issues/18209)).