forked from ANXS/postgresql
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
55 lines (46 loc) · 2.09 KB
/
.travis.yml
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
language: python
python: "2.7"
services:
- docker
env:
global:
- ROLE_GLOBALS="postgresql_shared_buffers=32MB"
matrix:
- ROLE_OPTIONS="postgresql_version=9.1" ANSIBLE_VERSION="1.9.4"
- ROLE_OPTIONS="postgresql_version=9.2" ANSIBLE_VERSION="1.9.4"
- ROLE_OPTIONS="postgresql_version=9.3" ANSIBLE_VERSION="1.9.4"
- ROLE_OPTIONS="postgresql_version=9.4" ANSIBLE_VERSION="1.9.4"
- ROLE_OPTIONS="postgresql_version=9.5" ANSIBLE_VERSION="1.9.4"
- ROLE_OPTIONS="postgresql_version=9.6" ANSIBLE_VERSION="1.9.4"
- ROLE_OPTIONS="postgresql_version=9.1" ANSIBLE_VERSION="2.1.2.0"
- ROLE_OPTIONS="postgresql_version=9.2" ANSIBLE_VERSION="2.1.2.0"
- ROLE_OPTIONS="postgresql_version=9.3" ANSIBLE_VERSION="2.1.2.0"
- ROLE_OPTIONS="postgresql_version=9.4" ANSIBLE_VERSION="2.1.2.0"
- ROLE_OPTIONS="postgresql_version=9.5" ANSIBLE_VERSION="2.1.2.0"
- ROLE_OPTIONS="postgresql_version=9.6" ANSIBLE_VERSION="2.1.2.0"
before_install:
# Remove the PostgreSQL installed by Travis
- sudo apt-get purge pgdg-keyring '^postgresql.*' -y
- sudo apt-get autoremove -y -qq
- sudo rm -rf /etc/postgresql
- sudo rm -rf /var/lib/postgresql
- sudo rm -f /etc/apt/sources.list.d/pgdg-source.list
# Install some dependencies
- sudo apt-get update -qq -y
- sudo apt-get install -qq -y python-apt python-pycurl locales
- echo 'en_US.UTF-8 UTF-8' | sudo tee /var/lib/locales/supported.d/local
install:
- pip install ansible=="$ANSIBLE_VERSION"
script:
- echo localhost > inventory
# Syntax check
- ansible-playbook -i inventory tests/playbook.yml --syntax-check
# Play test
- ansible-playbook -i inventory tests/playbook.yml --connection=local --sudo -e "$ROLE_GLOBALS $ROLE_OPTIONS"
# Idempotence test
- ansible-playbook -i inventory tests/playbook.yml --connection=local --sudo -e "$ROLE_GLOBALS $ROLE_OPTIONS" > idempotence_out
- ./tests/idempotence_check.sh idempotence_out
# Testing with docker (experimental)
- docker build -f tests/Dockerfile-ubuntu14.04 -t postgres_ubuntu14.04 .
- docker build -f tests/Dockerfile-centos6 -t postgres_centos6 .