forked from sansible/php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
48 lines (41 loc) · 1.23 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
47
48
---
group: stable
dist: trusty
branches:
only:
- develop
- master
language: python
python: "2.7"
env:
- ANSIBLE_INSTALL_VERSION=1.9.4
- ANSIBLE_INSTALL_VERSION=2.0.0.2
- ANSIBLE_INSTALL_VERSION=2.0.2.0
- ANSIBLE_INSTALL_VERSION=2.1.1.0
before_install:
# Make sure everything's up to date.
- sudo apt-get update -qq
install:
# Install Ansible.
- pip install ansible==${ANSIBLE_INSTALL_VERSION} ansible-lint
script:
# Install Role Dependencies
- make test_deps lint
# First run
- cd tests/
# Test the "build" stage
- ansible-playbook -i inventory test.yml --tags=build --connection=local
- >
ansible-playbook -i inventory test.yml --tags=build --connection=local
| grep -q 'changed=0.*failed=0'
&& (echo 'Idempotence test: pass' && exit 0)
|| (echo 'Idempotence test: fail' && exit 1)
# Test the "configure" stage
- ansible-playbook -i inventory test.yml --tags=configure --connection=local
- >
ansible-playbook -i inventory test.yml --tags=configure --connection=local
| grep -q 'changed=0.*failed=0'
&& (echo 'Idempotence test: pass' && exit 0)
|| (echo 'Idempotence test: fail' && exit 1)
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/