1515
1616jobs :
1717 integration-tests :
18- name : Python v${{ matrix.version }}
19- runs-on : ubuntu-latest
18+ name : Python v${{ matrix.python-version }} - Django ${{ matrix.django- version }}
19+ runs-on : ubuntu-latest
2020 strategy :
2121 # If we run more than one job at a time, we will have to have one cluster
2222 # for each flavor of the job. Otherwise they will interfere with each other
2323 # These tests are quite fast. We don't need to have many clusters.
2424 max-parallel : 1
2525 matrix :
26- # Run test for every python version we intend to support.
27- version : ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
26+ # Run test for every Python and Django version we intend to support.
27+ python-version :
28+ - ' 3.8'
29+ - ' 3.9'
30+ - ' 3.10'
31+ - ' 3.11'
32+ - ' 3.12'
33+ - ' 3.13'
34+ django-version :
35+ - ' default'
36+ - ' >=4.2,<4.3'
37+ - ' >=5.0,<5.1'
38+ - ' >=5.1,<5.2'
39+ - ' >=5.2,<5.3'
40+ exclude :
41+ # Django 5.0+ requires Python 3.10+
42+ - python-version : ' 3.8'
43+ django-version : ' >=5.0,<5.1'
44+ - python-version : ' 3.8'
45+ django-version : ' >=5.1,<5.2'
46+ - python-version : ' 3.8'
47+ django-version : ' >=5.2,<5.3'
48+ - python-version : ' 3.9'
49+ django-version : ' >=5.0,<5.1'
50+ - python-version : ' 3.9'
51+ django-version : ' >=5.1,<5.2'
52+ - python-version : ' 3.9'
53+ django-version : ' >=5.2,<5.3'
2854 permissions :
2955 id-token : write
3056 contents : read
@@ -36,14 +62,11 @@ jobs:
3662 steps :
3763 - name : Checkout code
3864 uses : actions/checkout@v5
39- # with:
40- # # For pull requests, check out the base branch, not the PR branch
41- # ref: ${{ github.event.pull_request.base.sha }}
4265
43- - name : Set up Python ${{ matrix.version }}
66+ - name : Set up Python ${{ matrix.python- version }}
4467 uses : actions/setup-python@v6
4568 with :
46- python-version : ${{ matrix.version }}
69+ python-version : ${{ matrix.python- version }}
4770
4871 - name : Install uv
4972 uses : astral-sh/setup-uv@v6
5780 - name : Setup dependencies
5881 run : |
5982 uv sync --extra test --extra dev
60- uv run python3 -c "import boto3; print(boto3.__version__)"
83+ uv run python -c "import boto3; print(boto3.__version__)"
6184 echo "$GITHUB_WORKSPACE" >> $GITHUB_PATH
6285
86+ # Install specific Django version for matrix testing, skip for 'default' to verify pyproject.toml version
87+ - name : Install Django ${{ matrix.django-version }}
88+ if : matrix.django-version != 'default'
89+ run : |
90+ uv pip install "django${{ matrix.django-version }}"
91+
92+ - name : Print Django version
93+ run : |
94+ uv run python -c "import django; print(f'Django version: {django.get_version()}')"
95+
6396 - name : Lint with ruff
6497 run : |
6598 # Check code formatting
@@ -79,17 +112,17 @@ jobs:
79112 DJANGO_SETTINGS_MODULE : aurora_dsql_django.tests.test_settings
80113 run : |
81114 uv run pytest --cov=aurora_dsql_django aurora_dsql_django/tests/unit/ --cov-report=xml
82-
115+
83116 - name : Debug test results
84117 if : always()
85118 run : |
86119 cat coverage.xml || echo "coverage.xml not found"
87-
120+
88121 - name : Archive code coverage results
89122 uses : actions/upload-artifact@v4
90123 with :
91- name : code-coverage-report
92- path : coverage-v${{ matrix.version }} .xml
124+ name : code-coverage-report-${{ github.job }}-${{ strategy.job-index }}
125+ path : coverage.xml
93126
94127 - name : Run integration tests
95128 env :
0 commit comments