-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
45 lines (39 loc) · 1.4 KB
/
.travis.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
language: python
dist: bionic
python: 3.6
stages:
- lint
- test
env:
PEEWEE_URL: postgres://postgres:@localhost/pacifica_metadata
BROKER_URL: redis://127.0.0.1:6379/0
BACKEND_URL: redis://127.0.0.1:6379/0
script:
- cd tests
- coverage run --include='*pacifica/elasticsearch/*' -p -m celery -A pacifica.elasticsearch.tasks worker -l info &
- coverage run --include='*pacifica/elasticsearch/*' -m pytest -xsv
- celery -A pacifica.elasticsearch.tasks control shutdown || true
- coverage combine -a .coverage*
- coverage report -m --fail-under 100
before_script:
- pip install ansible
- ansible-galaxy install pacifica.ansible_pacifica pacifica.ansible_travis
- ansible-playbook ~/.ansible/roles/pacifica.ansible_travis/molecule/common/playbook.yml -i ~/.ansible/roles/pacifica.ansible_travis/molecule/common/inventory.yml -e "ansible_python_interpreter=/home/travis/virtualenv/python${TRAVIS_PYTHON_VERSION}/bin/python travis_virtualenv=python${TRAVIS_PYTHON_VERSION} github_repository=elasticsearch"
- pip install 'celery>4.4.1'
jobs:
include:
- stage: lint
before_script: skip
script: pre-commit run -a
- python: 3.7
before_script: skip
script: pre-commit run -a
- python: 3.8
before_script: skip
script: pre-commit run -a
- stage: test
- python: 3.7
- python: 3.8
install:
- pip install -r requirements-dev.txt
- pip install .