-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
26 lines (23 loc) · 1.04 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
sudo: required
language: python
env:
- ANSIBLE_VERSION="2.7.*" # First released on 2018-10-04
- ANSIBLE_VERSION="2.6.*" # First released on 2018-06-28
- ANSIBLE_VERSION="2.6.*" EXTRA_VARS="thelounge_version=2"
install:
- pip install ansible==$ANSIBLE_VERSION
script:
# Check the role syntax
- ansible-playbook --inventory='localhost,' tests/test.yml --syntax-check
# Check that the role can run with no errors/failures
- ansible-playbook --extra-vars "$EXTRA_VARS" --inventory='localhost,' tests/test.yml --connection=local -vvvv
# Check idempotence of the role by running it twice and making sure there are
# no changed/failed tasks
# FIXME: Re-add when https://github.com/ansible/ansible/pull/39557 makes it in
# - >
# ansible-playbook --extra-vars "$EXTRA_VARS" --inventory='localhost,' tests/test.yml --connection=local
# | tee /dev/stderr
# | grep -q 'changed=0.*failed=0'
# && (printf '\n*** Idempotence test: ok ***\n' && exit 0)
# || (printf "\n*** Idempotence test: failed ***\n" && exit 1)
- ./tests/tests.sh