blob: c84bc8082a5375ee20ea46ff9e4d8fb13fd7a4e7 (
plain) (
tree)
|
|
---
dist: bionic
language: python
python: "3.8"
# Test on all supported PG versions on both debian stretch and debian buster
env:
- POSTGRESQL_VERSION=9.5 DEBIAN_RELEASE=stretch
- POSTGRESQL_VERSION=9.6 DEBIAN_RELEASE=stretch
- POSTGRESQL_VERSION=10 DEBIAN_RELEASE=stretch
- POSTGRESQL_VERSION=11 DEBIAN_RELEASE=stretch
- POSTGRESQL_VERSION=12 DEBIAN_RELEASE=stretch
- POSTGRESQL_VERSION=9.5 DEBIAN_RELEASE=buster
- POSTGRESQL_VERSION=9.6 DEBIAN_RELEASE=buster
- POSTGRESQL_VERSION=10 DEBIAN_RELEASE=buster
- POSTGRESQL_VERSION=11 DEBIAN_RELEASE=buster
- POSTGRESQL_VERSION=12 DEBIAN_RELEASE=buster
# Install pip
addons:
apt:
packages:
- python-pip
# Tests are using docker to spawn fake instances
services:
- docker
install:
# Install ansible
- pip install -r test/requirements.txt
# 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
- ansible-playbook test/main.yml -i test/hosts -e "postgres_version=${POSTGRESQL_VERSION}" -e "debian_release=${DEBIAN_RELEASE}"
# 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/
|