@@ -11,44 +11,46 @@ permissions:
1111jobs :
1212 lint :
1313 runs-on : ubuntu-latest
14+ container : python:3.7-slim
1415 steps :
1516 - uses : actions/checkout@v3
16- - uses : actions/setup-python@v4
17- id : setup-py
18- with :
19- python-version : ' 3.7'
20- - run : pip install -U tox
21- - name : alias pythonX.Y for tox
22- run : alias python${{ steps.setup-py.outputs.python-version }}=${{ steps.setup-py.outputs.python-path }}
17+ - run : pip install tox
2318 - run : TOXENV=lint tox
2419
2520
2621 test :
2722 strategy :
2823 matrix :
29- python : ['3.6', '3. 7', '3.8', '3.9', '3.10']
24+ python : ['3.7', '3.8', '3.9', '3.10']
3025 django : ['1.11', '2.0', '2.1', '2.2', '3.0', '3.1', '3.2', '4.0', '4.1']
31- # TODO: elasticsearch: ['6', '7', '8', '9 ']
26+ elastic : ['6', '7', '8']
3227 exclude :
33- - {python: '3.6', django: '4.0'}
34- - {python: '3.6', django: '4.1'}
3528 - {python: '3.7', django: '4.0'}
3629 - {python: '3.7', django: '4.1'}
3730 - {python: '3.10', django: '1.11'}
3831 - {python: '3.10', django: '2.0'}
3932 runs-on : ubuntu-latest
33+ container : python:${{matrix.python}}-slim
4034 services :
41- elasticsearch :
42- image : elasticsearch:6.8.23
43- ports :
44- - 9201:9200
35+ elasticsearch6 :
36+ image : docker.elastic.co/elasticsearch/elasticsearch:6.8.23
37+ env :
38+ discovery.type : single-node
39+ elasticsearch7 :
40+ image : docker.elastic.co/elasticsearch/elasticsearch:7.17.6
41+ env :
42+ discovery.type : single-node
43+ elasticsearch8 :
44+ image : docker.elastic.co/elasticsearch/elasticsearch:8.4.1
45+ env :
46+ discovery.type : single-node
47+ ELASTIC_CLIENT_APIVERSIONING : 1 # act like es7
48+ xpack.security.enabled : " false" # it'll be fine
49+ action.destructive_requires_name : " false" # we'll delete * in a moment
50+ env :
51+ ELASTICSEARCH_HOST : elasticsearch${{matrix.elastic}}:9200
4552 steps :
4653 - uses : actions/checkout@v3
47- - uses : actions/setup-python@v4
48- id : setup-py
49- with :
50- python-version : ${{ matrix.python }}
5154 - run : pip install -U tox
52- - run : alias python${{ steps.setup-py.outputs.python-version }}=${{ steps.setup-py.outputs.python-path }}
53- - run : TOXENV=`echo 'py${{ matrix.python }}-django${{matrix.django}}' | sed 's/\.//g'` tox
55+ - run : TOXENV=`echo 'py${{matrix.python}}-django${{matrix.django}}-es${{matrix.elastic}}' | sed 's/\.//g'` tox
5456
0 commit comments