]> git.immae.eu Git - github/fretlink/ansible-postgresql-role.git/blame - .travis.yml
tests: remove automatic tests with PG 9.5 & 9.6
[github/fretlink/ansible-postgresql-role.git] / .travis.yml
CommitLineData
d0bc90e0 1---
0415357e 2dist: bionic
d0bc90e0 3language: python
0415357e 4python: "3.8"
d0bc90e0 5
0415357e
P
6# Test on all supported PG versions on both debian stretch and debian buster
7env:
0415357e
P
8- POSTGRESQL_VERSION=10 DEBIAN_RELEASE=stretch
9- POSTGRESQL_VERSION=11 DEBIAN_RELEASE=stretch
10- POSTGRESQL_VERSION=12 DEBIAN_RELEASE=stretch
0415357e
P
11- POSTGRESQL_VERSION=10 DEBIAN_RELEASE=buster
12- POSTGRESQL_VERSION=11 DEBIAN_RELEASE=buster
13- POSTGRESQL_VERSION=12 DEBIAN_RELEASE=buster
d0bc90e0
P
14
15# Install pip
16addons:
17 apt:
18 packages:
19 - python-pip
20
6037b0f8
P
21# Tests are using docker to spawn fake instances
22services:
23 - docker
24
d0bc90e0
P
25install:
26 # Install ansible
0415357e 27 - pip install -r test/requirements.txt
d0bc90e0
P
28 # Check ansible version
29 - ansible --version
c4606fce 30 - ansible-galaxy install -r test/requirements.yml -p test/roles/
d0bc90e0
P
31
32script:
33 # Basic role syntax check
c4606fce 34 - ansible-playbook test/main.yml -i test/hosts --syntax-check
dd54b748 35 # Run the tests
0415357e 36 - ansible-playbook test/main.yml -i test/hosts -e "postgres_version=${POSTGRESQL_VERSION}" -e "debian_release=${DEBIAN_RELEASE}"
6037b0f8
P
37 # FAILS - ansible-playbook test/main.yml -i test/hosts
38 # Even if Docker and docker-py module are present, the tests fail on Travis
39 # The error on Travis is:
40 # => {"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
41
42notifications:
43 webhooks: https://galaxy.ansible.com/api/v1/notifications/