Skip to content

Commit 98a2b1f

Browse files
committed
Restructure CI & tox configuration
This commit restructures the configuration of GH Actions CI and tox by offloading the testing matrix to tox and letting the GH CI decide only the Python and ES versions
1 parent eb2f181 commit 98a2b1f

File tree

7 files changed

+47
-44
lines changed

7 files changed

+47
-44
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,32 @@ on:
77

88
jobs:
99
test:
10+
name: Python ${{ matrix.python-version }} - Django ${{ matrix.django-version }}
1011
runs-on: ubuntu-latest
1112

1213
strategy:
1314
fail-fast: false
1415

1516
matrix:
16-
python-version: ["3.8", "3.9", "3.10", "3.11"]
17-
django-version: ["3.2", "4.1", "4.2"]
18-
es-dsl-version: ["6.4", "7.4"]
19-
es-version: ["8.10.2"]
17+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
18+
django-version: ["4.2", "4.2.8", "5.0", "5.1", "5.1.3", "5.2"]
19+
es-version: ["8.18.2"]
2020

2121
exclude:
22-
- python-version: "3.11"
23-
django-version: "3.2"
22+
- django-version: "4.2"
23+
python-version: "3.12"
24+
- django-version: "4.2"
25+
python-version: "3.13"
26+
- django-version: "4.2.8"
27+
python-version: "3.13"
28+
- django-version: "5.0"
29+
python-version: "3.9"
30+
- django-version: "5.1"
31+
python-version: "3.9"
32+
- django-version: "5.1.3"
33+
python-version: "3.9"
34+
- django-version: "5.2"
35+
python-version: "3.9"
2436

2537
steps:
2638
- name: Install and Run Elasticsearch
@@ -31,7 +43,7 @@ jobs:
3143
- uses: actions/checkout@v4
3244

3345
- name: Install Python ${{ matrix.python-version }}
34-
uses: actions/setup-python@v4
46+
uses: actions/setup-python@v5
3547
with:
3648
python-version: ${{ matrix.python-version }}
3749

@@ -46,13 +58,11 @@ jobs:
4658
- name: Install Dependencies
4759
run: |
4860
python -m pip install --upgrade pip
49-
python -m pip install "Django==${{ matrix.django-version }}"
50-
python -m pip install "elasticsearch-dsl==${{ matrix.es-dsl-version }}"
5161
python -m pip install -r requirements_test.txt
5262
53-
- name: Run tests with Python ${{ matrix.python-version }} and Django ${{ matrix.django-version }} and elasticsearch-dsl-py ${{ matrix.es-dsl-version }}
63+
- name: Run tox targets for ${{ matrix.python-version }}
5464
run: |
55-
TOX_ENV=$(echo "py${{ matrix.python-version }}-django-${{ matrix.django-version }}-es${{ matrix.es-dsl-version }}" | tr -d .)
65+
TOX_ENV=$(echo "py${{ matrix.python-version }}-dj${{ matrix.django-version }}" | tr -d .)
5666
python -m tox -e $TOX_ENV -- --elasticsearch
5767
python -m tox -e $TOX_ENV -- --elasticsearch --signal-processor celery
5868

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ sphinx:
66
formats: all
77

88
python:
9-
version: 3.8
9+
version: 3.9

README.rst

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,17 @@ Features
3030
- Index fast using `parallel` indexing.
3131
- Requirements
3232

33-
- Django >= 3.2
34-
- Python 3.8, 3.9, 3.10, 3.11
33+
- Django >= 4.2
34+
- Python 3.9, 3.10, 3.11, 3.12, 3.13
3535

3636
**Elasticsearch Compatibility:**
37-
The library is compatible with all Elasticsearch versions since 5.x
37+
The library is compatible with all Elasticsearch versions since 7.x
3838
**but you have to use a matching major version:**
3939

4040
- For Elasticsearch 8.0 and later, use the major version 8 (8.x.y) of the library.
4141

4242
- For Elasticsearch 7.0 and later, use the major version 7 (7.x.y) of the library.
4343

44-
- For Elasticsearch 6.0 and later, use the major version 6 (6.x.y) of the library.
45-
4644
.. code-block:: python
4745
4846
# Elasticsearch 8.x
@@ -51,7 +49,4 @@ The library is compatible with all Elasticsearch versions since 5.x
5149
# Elasticsearch 7.x
5250
elasticsearch-dsl>=7.0.0,<8.0.0
5351
54-
# Elasticsearch 6.x
55-
elasticsearch-dsl>=6.0.0,<7.0.0
56-
5752
.. _Search: http://elasticsearch-dsl.readthedocs.io/en/stable/search_dsl.html

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
django>=3.2
2-
elasticsearch-dsl>=8.0.0,<9.0.0
1+
django>=4.2
2+
elasticsearch-dsl>=8.9.0,<=8.17.1

requirements_dev.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
bumpversion==0.6.0
2-
wheel==0.41.2
3-
django>=3.2
4-
elasticsearch-dsl>=7.0.0,<8.0.0
2+
wheel==0.45.1
3+
django>=4.2
4+
elasticsearch-dsl>=8.9.0,<=8.17.1
55
twine
66
sphinx
77
-e .

requirements_test.txt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
coverage==7.3.1
2-
mock>=1.0.1
3-
flake8>=2.1.0
4-
tox>=1.7.0
5-
Pillow==10.0.0
6-
celery>=4.1.0
1+
coverage>=7.9.1
2+
mock>=5.2.0
3+
flake8>=7.3.0
4+
setuptools
5+
tox
6+
Pillow>=11.0.0
7+
celery>=5.5.3
78

89
# Additional test requirements go here

tox.ini

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
[tox]
22
envlist =
3-
py{38,39,310}-django-{32,41,42}-{es64,es74}
4-
py{311}-django-{41,42}-{es64,es74}
3+
py{39,310,311}-dj{42}
4+
py{39,310,311,312}-dj{428}
5+
py{310,311,312}-dj{50,51}
6+
py{310,311,312,313}-dj{513,52}
57

68

79
[testenv]
@@ -10,15 +12,10 @@ setenv =
1012
commands = coverage run --source django_elasticsearch_dsl runtests.py {posargs}
1113

1214
deps =
13-
django-32: Django>=3.2,<3.3
14-
django-41: Django>=4.1,<4.2
15-
django-42: Django>=4.2,<4.3
16-
es64: elasticsearch-dsl>=6.4.0,<7.0.0
17-
es74: elasticsearch-dsl>=7.4.0,<8
15+
dj42: Django>=4.2,<4.2.8
16+
dj428: Django>=4.2.8,<5.0
17+
dj50: Django>=5.0,<5.1
18+
dj51: Django>=5.1,<5.1.3
19+
dj513: Django>=5.1.3,<5.2
20+
dj52: Django>=5.2,<5.3
1821
-r{toxinidir}/requirements_test.txt
19-
20-
basepython =
21-
py38: python3.8
22-
py39: python3.9
23-
py310: python3.10
24-
py311: python3.11

0 commit comments

Comments
 (0)