Skip to content

Commit 9dc46c2

Browse files
committed
- Added Python 3.13 to the matrix
- Added SQLAlchemy testsuite (Python 3.13 only)
1 parent 8198419 commit 9dc46c2

File tree

2 files changed

+30
-3
lines changed

2 files changed

+30
-3
lines changed

.github/workflows/ci.yml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Run CI Tests
33

44
on:
55
push:
6-
branches: ['1.1', '1.0']
6+
branches: ['1.1', '1.0', 'sqlalchemy']
77
pull_request:
88
workflow_dispatch:
99
schedule:
@@ -38,7 +38,7 @@ jobs:
3838
name: build matrix
3939
uses: rusher/mariadb-test-build-matrix@main
4040
with:
41-
additional-matrix: '[{"name": "MariaDB 11.4", "os": "ubuntu-latest", "db-type": "community", "db-tag": "11.4", "python": "3.9"},{"name": "MariaDB 11.4", "os": "ubuntu-latest", "db-type": "community", "db-tag": "11.4", "python": "3.10"},{"name": "MariaDB 11.4", "os": "ubuntu-latest", "db-type": "community", "db-tag": "11.4", "python": "3.11"},{"name": "MariaDB 11.4", "os": "ubuntu-latest", "db-type": "community", "db-tag": "11.4", "python": "3.12"},{"name": "MariaDB 11.4", "os": "ubuntu-latest", "db-type": "community", "db-tag": "11.4", "python": "pypy3.11", "continue-on-error": true}]'
41+
additional-matrix: '[{"name": "MariaDB 11.4", "os": "ubuntu-latest", "db-type": "community", "db-tag": "11.4", "python": "3.9"},{"name": "MariaDB 11.4", "os": "ubuntu-latest", "db-type": "community", "db-tag": "11.4", "python": "3.10"},{"name": "MariaDB 11.4", "os": "ubuntu-latest", "db-type": "community", "db-tag": "11.4", "python": "3.11"},{"name": "MariaDB 11.4", "os": "ubuntu-latest", "db-type": "community", "db-tag": "11.4", "python": "3.12"},{"name": "MariaDB 11.4", "os": "ubuntu-latest", "db-type": "community", "db-tag": "11.4", "python": "3.13"}, {"name": "MariaDB 11.4", "os": "ubuntu-latest", "db-type": "community", "db-tag": "11.4", "python": "pypy3.11", "continue-on-error": true}]'
4242

4343
ci:
4444
name: ${{ matrix.name }} ${{ matrix.python != '' && format(' - python {0}', matrix.python) || '' }}
@@ -66,6 +66,7 @@ jobs:
6666
registry-user: ${{ matrix.db-type == 'enterprise' && secrets.ENTERPRISE_USER || (secrets.DOCKER_PWD != '' && 'mariadbtest' || '') }}
6767
registry-password: ${{ matrix.db-type == 'enterprise' && secrets.ENTERPRISE_TOKEN || secrets.DOCKER_PWD }}
6868
os: ${{ matrix.os }}
69+
init-script-folder: ${{ format('{0}/.github/workflows/init', github.workspace) }}
6970

7071
- uses: actions/setup-python@v5
7172
id: setup-python
@@ -79,6 +80,14 @@ jobs:
7980
owner: 'mariadb-corporation'
8081
repository: 'mariadb-connector-c'
8182

83+
- name: Clone SQLAlchemy
84+
if: ${{ startsWith(matrix.python, '3.13') }}
85+
uses: GuillaumeFalourd/[email protected]
86+
with:
87+
branch: main
88+
owner: 'sqlalchemy'
89+
repository: 'sqlalchemy'
90+
8291
- name: c/c make ubuntu
8392
if: ${{ startsWith(matrix.os, 'ubuntu') }}
8493
run: |
@@ -114,6 +123,23 @@ jobs:
114123
echo "MARIADB_CC_INSTALL_DIR=$MARIADB_CC_INSTALL_DIR" >> $env:GITHUB_ENV
115124
echo "MARIADB_PLUGIN_DIR=$MARIADB_CC_INSTALL_DIR/lib/mariadb/plugin" >> $env:GITHUB_ENV
116125
126+
- name: Run SQLAlchemy tests
127+
if: ${{ startsWith(matrix.python, '3.13') }}
128+
shell: bash
129+
run: |
130+
python --version
131+
python -m pip install .
132+
python -m pip install pytest typing_extensions
133+
cd ${{ github.workspace }}/sqlalchemy
134+
python -m pytest --dburi=mysql+mariadbconnector://$TEST_DB_USER:$TEST_DB_PASSWORD@$TEST_DB_HOST:$TEST_DB_PORT/$TEST_DB --backend-only
135+
env:
136+
TEST_DB_USER: ${{ env.MYSQL_TEST_USER }}
137+
TEST_DB_HOST: ${{ env.MYSQL_TEST_HOST }}
138+
TEST_DB_DATABASE: ${{ env.MYSQL_TEST_DB }}
139+
TEST_DB_PORT: ${{ env.MYSQL_TEST_PORT }}
140+
TEST_DB_PASSWORD: ${{ env.MYSQL_TEST_PASSWD }}
141+
TEST_DB: ${{ env.MYSQL_TEST_DB }}
142+
117143
- name: Run test suite
118144
shell: bash
119145
run: |
@@ -128,4 +154,4 @@ jobs:
128154
TEST_DB_PORT: ${{ env.MYSQL_TEST_PORT }}
129155
TEST_DB_PASSWORD: ${{ env.MYSQL_TEST_PASSWD }}
130156
LOCAL_DB: ${{ steps.setup-env.outputs.database-type }}
131-
PYTHON_VERSION: ${{ steps.setup-python.outputs.python-version }}
157+
PYTHON_VERSION: ${{ steps.setup-python.outputs.python-version }}

.github/workflows/init/start.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CREATE SCHEMA IF NOT EXISTS test_schema

0 commit comments

Comments
 (0)