]>
Commit | Line | Data |
---|---|---|
d0bc90e0 P |
1 | --- |
2 | language: python | |
3 | python: "3.5" | |
4 | ||
5 | # Use the new container infrastructure | |
6 | sudo: false | |
7 | ||
8 | # Install pip | |
9 | addons: | |
10 | apt: | |
11 | packages: | |
12 | - python-pip | |
13 | ||
6037b0f8 P |
14 | # Tests are using docker to spawn fake instances |
15 | services: | |
16 | - docker | |
17 | ||
d0bc90e0 P |
18 | install: |
19 | # Install ansible | |
dd54b748 | 20 | - pip install ansible docker-py docker |
d0bc90e0 P |
21 | # Check ansible version |
22 | - ansible --version | |
c4606fce | 23 | - ansible-galaxy install -r test/requirements.yml -p test/roles/ |
d0bc90e0 P |
24 | |
25 | script: | |
26 | # Basic role syntax check | |
c4606fce | 27 | - ansible-playbook test/main.yml -i test/hosts --syntax-check |
dd54b748 | 28 | # Run the tests |
6037b0f8 P |
29 | # FAILS - ansible-playbook test/main.yml -i test/hosts |
30 | # Even if Docker and docker-py module are present, the tests fail on Travis | |
31 | # The error on Travis is: | |
32 | # => {"changed": false, "item": {"image": "python:3.7-stretch", "links": ["postgres_barman", "postgres_one"], "name": "postgres_three"}, "msg": "Failed to import docker or docker-py - No module named docker. Try `pip install docker` or `pip install docker-py` (Python 2.6)"} | |
d0bc90e0 P |
33 | |
34 | notifications: | |
35 | webhooks: https://galaxy.ansible.com/api/v1/notifications/ |