]> git.immae.eu Git - github/fretlink/ansible-postgresql-role.git/blame_incremental - .travis.yml
Merge pull request #13 from paulRbr/optional-restore-command
[github/fretlink/ansible-postgresql-role.git] / .travis.yml
... / ...
CommitLineData
1---
2dist: bionic
3language: python
4python: "3.8"
5
6# Test on all supported PG versions on both debian stretch and debian buster
7env:
8- POSTGRESQL_VERSION=10 DEBIAN_RELEASE=stretch
9- POSTGRESQL_VERSION=11 DEBIAN_RELEASE=stretch
10- POSTGRESQL_VERSION=12 DEBIAN_RELEASE=stretch
11- POSTGRESQL_VERSION=10 DEBIAN_RELEASE=buster
12- POSTGRESQL_VERSION=11 DEBIAN_RELEASE=buster
13- POSTGRESQL_VERSION=12 DEBIAN_RELEASE=buster
14
15# Install pip
16addons:
17 apt:
18 packages:
19 - python-pip
20
21# Tests are using docker to spawn fake instances
22services:
23 - docker
24
25install:
26 # Install ansible
27 - pip install -r test/requirements.txt
28 # Check ansible version
29 - ansible --version
30 - ansible-galaxy install -r test/requirements.yml -p test/roles/
31
32script:
33 # Basic role syntax check
34 - ansible-playbook test/main.yml -i test/hosts --syntax-check
35 # Run the tests
36 - ansible-playbook test/main.yml -i test/hosts -e "postgres_version=${POSTGRESQL_VERSION}" -e "debian_release=${DEBIAN_RELEASE}"
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)"}
41
42notifications:
43 webhooks: https://galaxy.ansible.com/api/v1/notifications/