forked from nextcloud/ansible-collection-nextcloud-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
56 lines (48 loc) · 1.58 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
56
---
language: python
python: "2.7"
os: linux
dist: xenial
services:
- mysql
- redis
matrix:
include:
# latest ansible + code coverage
- env: ansible_version="2.9" NC_DB=mysql NC_WEB=apache2
- env: ansible_version="2.9" NC_DB=mysql NC_WEB=nginx
- env: ansible_version="" NC_DB=pgsql NC_WEB=apache2
- env: ansible_version="" NC_DB=pgsql NC_WEB=nginx
# backward compatibility:
# ansible 2.9.x
- env: ansible_version="<2.10" NC_DB=mysql NC_WEB=apache2
# ansible 2.8.x
- env: ansible_version="<2.9" NC_DB=mysql NC_WEB=apache2
# ansible 2.7.x
- env: ansible_version="<2.8" NC_DB=mysql NC_WEB=apache2
# ansible 2.6.x
- env: ansible_version="<2.7" NC_DB=mysql NC_WEB=apache2
# ansible 2.5.x
- env: ansible_version="<2.6" NC_DB=mysql NC_WEB=apache2
sudo: required
# Install ansible
before_install:
- sudo apt-get install python-setuptools
- sudo easy_install pip
# Install ansible
- sudo pip install -I "ansible${ansible_version}"
- sudo apt-get install python-netaddr
install:
# Check ansible version
- ansible --version
# Create ansible.cfg with correct roles_path
- printf '[defaults]\nroles_path=../' >ansible.cfg
script:
# Basic role syntax check
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
# Test Demo case 1
- ansible-playbook tests/test.yml -i tests/inventory
# test login pages
- curl -i -s --insecure --data "user=ncadmin&password=" https://localhost/index.php/login | egrep -q "Location:.*/apps/files/"
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/