Skip to content

Commit

Permalink
add test for tidb 5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyuhang0 committed Aug 19, 2022
1 parent b0f175e commit 64b0b21
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,41 @@ jobs:
export DBT_TEST_USER_3=user3
PYTHONPATH=. pytest tests/functional/adapter/tidb
tidb_5_3:
name: Python ${{ matrix.python-version }} | TiDB 5.3
runs-on: ubuntu-latest

strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10' ]

services:
tidb_nightly:
image: pingcap/tidb:v5.3.2
ports:
- 4000:4000

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install requirements
run: |
pip install -r requirements_dev.txt
- name: Run tests
run: |
mysql -P4000 -uroot -h127.0.0.1 < tests/functional/adapter/tidb/grant/create_user.sql
export DBT_TEST_USER_1=user1
export DBT_TEST_USER_2=user2
export DBT_TEST_USER_3=user3
PYTHONPATH=. pytest tests/functional/adapter/tidb
tidb_5_1:
name: Python ${{ matrix.python-version }} | TiDB 5.1
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import os
import sys

if sys.version_info < (3, 7) or sys.version_info >= (3, 10):
if sys.version_info < (3, 8) or sys.version_info >= (3, 10):
print('Error: dbt-tidb does not support this version of Python.')
print('Please install Python 3.7 or higher but less than 3.10.')
print('Please install Python 3.8 or higher but less than 3.10.')
sys.exit(1)

# require version of setuptools that supports find_namespace_packages
Expand Down

0 comments on commit 64b0b21

Please sign in to comment.