-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
41 lines (31 loc) · 1.25 KB
/
.travis.yml
File metadata and controls
41 lines (31 loc) · 1.25 KB
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
---
services: docker
env:
- distro: ubuntu1604
- distro: ubuntu1404
- distro: centos7
- distro: debian8
- distro: fedora24
before_install:
# Pull container.
- 'docker pull geerlingguy/docker-${distro}-ansible:latest'
script:
# Configure test script so we can run extra tests after playbook is run.
- export container_id=$(date +%s)
- export cleanup=false
- export test_idempotence=false
# Download test shim.
- wget -O ${PWD}/tests/test.sh https://gist.githubusercontent.com/dm/64a7d3059090d2e833ed4658ca399d91/raw/
- chmod +x ${PWD}/tests/test.sh
# Run tests.
- ${PWD}/tests/test.sh
# Ansible syntax check.
- 'docker exec --tty "${container_id}" ansible-playbook /etc/ansible/roles/role_under_test/tests/test.yml --syntax-check -vvvv'
# Test role.
- 'docker exec "${container_id}" ansible-playbook /etc/ansible/roles/role_under_test/tests/test.yml -vvvv'
# Test whether packages are installed as specified.
# - docker exec --tty "${container_id}" pip list installed | grep -e '^Flask.*0\.12\.2.*$'
# - docker exec --tty "${container_id}" pip list installed | grep '^Django'
# - docker exec --tty "${container_id}" pip list installed | grep '^docker'
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/