-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
60 lines (51 loc) · 1.36 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
60
---
language: python
python: "2.7"
sudo: required
os: linux
env:
- SCENARIO=default
- SCENARIO=ubuntu
- SCENARIO=debian
- SCENARIO=centos
- SCENARIO=fedora
matrix:
include:
- os: osx
language: generic
# Install Python and pip
before_install:
- >-
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update
brew install python
brew install md5sha1sum
virtualenv venv -p python
source venv/bin/activate
fi
- >-
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo apt-get -qq update
sudo apt-get install -qq python-pip
pip install -q molecule docker-py
fi
install:
# Install ansible
- pip install -q ansible
# Check ansible version
- ansible --version
script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then molecule test --scenario-name $SCENARIO; fi
- >-
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
# Create ansible.cfg with correct roles_path
printf '[defaults]\nroles_path=../' >ansible.cfg
# Install dependencies (for syntax check and installation)
ansible-galaxy install --roles-path ../ andrewrothstein.anaconda
# Syntax check
ansible-playbook tests/test.yml -i tests/inventory --syntax-check
# Install role
ansible-playbook tests/test.yml -i tests/inventory
fi
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/