Skip to content

Commit 1e1e0b3

Browse files
Merge pull request #1498 from datajoint/ci/mysql-8.4-matrix
ci: test MySQL 8.0 and 8.4 (LTS) in the matrix; parameterize MySQL image
2 parents b6e8cc5 + 150891c commit 1e1e0b3

2 files changed

Lines changed: 14 additions & 5 deletions

File tree

.github/workflows/test.yaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,15 @@ jobs:
3030
strategy:
3131
fail-fast: false
3232
matrix:
33-
# Exercise both ends of the supported range (requires-python
34-
# >=3.10,<3.15). The version-pinned pixi environments are defined in
35-
# pyproject.toml under [tool.pixi.environments].
33+
# Python: exercise both ends of the supported range (requires-python
34+
# >=3.10,<3.15); version-pinned pixi environments live in pyproject.toml
35+
# under [tool.pixi.environments].
3636
environment: [test-py310, test-py314]
37-
name: test (${{ matrix.environment }})
37+
# MySQL: exercise both LTS lines we support / that AWS RDS runs. 8.0 uses
38+
# the datajoint image (SSL configured); 8.4 uses the official image (TLS
39+
# tests already skip outside external containers). See #1497.
40+
mysql-image: ["datajoint/mysql:8.0", "mysql:8.4"]
41+
name: test (${{ matrix.environment }}, mysql=${{ matrix.mysql-image }})
3842
steps:
3943
- uses: actions/checkout@v4
4044

@@ -46,6 +50,8 @@ jobs:
4650
environments: ${{ matrix.environment }}
4751

4852
- name: Run tests
53+
env:
54+
DJ_TEST_MYSQL_IMAGE: ${{ matrix.mysql-image }}
4955
run: pixi run -e ${{ matrix.environment }} test-cov
5056

5157
# Unit tests run without containers (faster feedback)

tests/conftest.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,10 @@ def mysql_container():
114114
from testcontainers.mysql import MySqlContainer
115115

116116
container = MySqlContainer(
117-
image="datajoint/mysql:8.0", # Use datajoint image which has SSL configured
117+
# Default: the datajoint image (SSL configured, for TLS tests under
118+
# external containers). CI overrides via DJ_TEST_MYSQL_IMAGE to exercise
119+
# multiple supported server versions (e.g. the 8.4 LTS line). See #1497.
120+
image=os.environ.get("DJ_TEST_MYSQL_IMAGE", "datajoint/mysql:8.0"),
118121
username="root",
119122
password="password",
120123
dbname="test",

0 commit comments

Comments
 (0)