forked from barseghyanartur/django-elasticsearch-dsl-drf
-
Notifications
You must be signed in to change notification settings - Fork 0
130 lines (119 loc) · 4.1 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: test
on: [push, pull_request]
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9']
es-version: ['6', '7']
include:
- python-version: 3.7
tox_env: py37-django22-elasticsearch7
requirements: django_2_2
- python-version: 3.7
tox_env: py37-django31-elasticsearch7
requirements: django_3_1
- python-version: 3.7
tox_env: py37-django32-elasticsearch7
requirements: django_3_2
- python-version: 3.7
tox_env: py37-django22-elasticsearch6
requirements: django_2_2
- python-version: 3.7
tox_env: py37-django31-elasticsearch6
requirements: django_3_1
- python-version: 3.7
tox_env: py37-django32-elasticsearch6
requirements: django_3_2
- python-version: 3.8
tox_env: py38-django22-elasticsearch7
requirements: django_2_2
- python-version: 3.8
tox_env: py38-django31-elasticsearch7
requirements: django_3_1
- python-version: 3.8
tox_env: py38-django32-elasticsearch7
requirements: django_3_2
- python-version: 3.8
tox_env: py38-django22-elasticsearch6
requirements: django_2_2
- python-version: 3.8
tox_env: py38-django31-elasticsearch6
requirements: django_3_1
- python-version: 3.8
tox_env: py38-django32-elasticsearch6
requirements: django_3_2
- python-version: 3.9
tox_env: py39-django22-elasticsearch7
requirements: django_2_2
- python-version: 3.9
tox_env: py39-django31-elasticsearch7
requirements: django_3_1
- python-version: 3.9
tox_env: py39-django32-elasticsearch7
requirements: django_3_2
- python-version: 3.9
tox_env: py39-django22-elasticsearch6
requirements: django_2_2
- python-version: 3.9
tox_env: py39-django31-elasticsearch6
requirements: django_3_1
- python-version: 3.9
tox_env: py39-django32-elasticsearch6
requirements: django_3_2
services:
elasticsearch:
image: bitnami/elasticsearch:${{ matrix.es-version }}
ports:
- 9200:9200
options: >-
-e="discovery.type=single-node"
--health-cmd="curl http://localhost:9200/_cluster/health"
--health-interval=10s
--health-timeout=5s
--health-retries=10
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install pip-tools
python -m pip install tox
pip-compile examples/requirements/${{ matrix.requirements }}.in
pip-compile examples/requirements/elastic_${{ matrix.es-version }}x.in
pip-compile examples/requirements/test.in
python -m pip install -r examples/requirements/${{ matrix.requirements }}.txt
python -m pip install -r examples/requirements/elastic_${{ matrix.es-version }}x.txt
python -m pip install -r examples/requirements/test.txt
- name: Run tests
uses: nick-invision/retry@v2
with:
command: tox -e ${{ matrix.tox_env }} -- --color yes
timeout_minutes: 15
max_attempts: 3
- name: Upload to Codecov
uses: codecov/codecov-action@v2
- name: Coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
flag-name: Run Tests
coveralls_finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
GITHUB_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
uses: AndreMiras/coveralls-python-action@develop
with:
parallel-finished: true
debug: True