blob: ddf6fb04af87be073845a6b175f7a99119917418 (
plain) (
blame)
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
|
---
language: python
python: "3.5"
# Use the new container infrastructure
sudo: false
# Install pip
addons:
apt:
packages:
- python-pip
# Tests are using docker to spawn fake instances
services:
- docker
install:
# Install ansible
- pip install ansible docker-py docker
# Check ansible version
- ansible --version
- ansible-galaxy install -r test/requirements.yml -p test/roles/
script:
# Basic role syntax check
- ansible-playbook test/main.yml -i test/hosts --syntax-check
# Run the tests
# FAILS - ansible-playbook test/main.yml -i test/hosts
# Even if Docker and docker-py module are present, the tests fail on Travis
# The error on Travis is:
# => {"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)"}
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/
|