-
Notifications
You must be signed in to change notification settings - Fork 18
95 lines (86 loc) · 2.71 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
name: test
on: [push, pull_request]
jobs:
test:
name: Test Elasticsearch
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
es-version: ['6', '7']
include:
- python-version: '3.7'
tox_env: py37-elastic6
requirements: elastic_6x
- python-version: '3.7'
tox_env: py37-elastic7
requirements: elastic_7x
- python-version: '3.8'
tox_env: py38-elastic6
requirements: elastic_6x
- python-version: '3.8'
tox_env: py38-elastic7
requirements: elastic_7x
- python-version: '3.9'
tox_env: py39-elastic6
requirements: elastic_6x
- python-version: '3.9'
tox_env: py39-elastic7
requirements: elastic_7x
- python-version: '3.10'
tox_env: py310-elastic6
requirements: elastic_6x
- python-version: '3.10'
tox_env: py310-elastic7
requirements: elastic_7x
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
rm requirements/testing_${{ matrix.es-version }}x.txt
pip-compile requirements/testing_${{ matrix.es-version }}x.in
python -m pip install -r requirements/testing_${{ matrix.es-version }}x.txt
- name: Run tests
uses: nick-invision/retry@v2
with:
command: ANYSEARCH_PREFERRED_BACKEND=Elasticearch python runtests.py
timeout_minutes: 15
max_attempts: 4
- 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