-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
59 lines (48 loc) · 1.23 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
57
58
59
---
language: python
os: linux
cache: pip
env:
global:
- ANSIBLE_CONFIG=~/.ansible/ansible.cfg
jobs:
include:
- python: 3.8
env: ANSIBLE_VERSION=latest
- python: 3.8
env: ANSIBLE_VERSION==2.9.0
- python: 3.8
env: ANSIBLE_VERSION==2.8.0
- python: 3.6
env: ANSIBLE_VERSION=latest
- python: 3.6
env: ANSIBLE_VERSION==2.9.0
- python: 3.6
env: ANSIBLE_VERSION==2.8.0
- python: 2.7
env: ANSIBLE_VERSION==2.8.0
- python: 2.7
env: ANSIBLE_VERSION==2.7.0
branches:
only:
- master
- develop
before_install:
- python --version
install:
# Install ansible and ansible-lint
- if [ "$ANSIBLE_VERSION" = "latest" ]; then pip install ansible; else pip
install ansible==$ANSIBLE_VERSION; fi
- pip install ansible-lint yamllint
# Check versions
- ansible --version
- ansible-lint --version
# Create ansible.cfg with correct roles_path
- printf '[defaults]\nroles_path=../' > ~/.ansible/ansible.cfg
script:
# Basic role syntax check and lint
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check -vv
- yamllint .
- ansible-lint tests/test.yml -vvv
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/