forked from devjatkin/sphinx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
46 lines (38 loc) · 1.31 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
46
---
language: generic
python: "2.7"
sudo: required
dist: trusty
matrix:
include:
- env: ANSIBLE_VERSION=1.9.6
- env: ANSIBLE_VERSION=2.1.2.0
before_install:
- sudo apt-get update -qq
- sudo apt-get install -y git software-properties-common python-pip aptitude
- sudo aptitude install -y mysql-client-5.5
- sudo pip install ansible==$ANSIBLE_VERSION
- ansible --version
install:
- git clone https://github.com/sstephenson/bats.git
- sudo ./bats/install.sh /usr/local
script:
- echo localhost > inventory
# Check the install/playbook's syntax
- sudo ansible-playbook --syntax-check -i inventory test/test.yml
# Run the role/playbook with ansible-playbook
- sudo ansible-playbook -i inventory test/test.yml --extra-vars 'sphinx_test=true'
# Run the role/playbook again, checking to make sure it's idempotent
- >
sudo ansible-playbook -i inventory test/test.yml --extra-vars 'sphinx_test=true'
| grep -q 'changed=0.*failed=0'
&& (echo 'Idempotence test: pass' && exit 0)
|| (echo 'Idempotence test: fail' && exit 1)
# Run the Test Kitchen tests.
- sudo /usr/local/bin/bats ./test/integration/default/bats/*.bats
after_script:
- sudo ls -la /tmp
- search another
- sudo cat /var/log/sphinxsearch/*.log
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/