-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
46 lines (36 loc) · 1.11 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
---
sudo: required
language: objective-c
# 10.13 (see https://docs.travis-ci.com/user/osx-ci-environment/#OS-X-Version)
os: osx
osx_image: xcode10.1
before_install:
- brew update
install:
# unlink brew node
- brew unlink node
# Install ruby
- brew install ruby
# Install Ansible.
#- brew install ansible
# do not test cask apps install, only java for elasticsearch
- "echo 'homebrew_cask_apps: [java8]' >> vars/override.yml"
# Add a hosts file.
- sudo mkdir -p /etc/ansible
- sudo touch /etc/ansible/hosts
- "echo -e '[local]\nlocalhost ansible_connection=local' | sudo tee -a /etc/ansible/hosts > /dev/null"
script:
# check ansible version
- "ansible --version"
# Check the role/playbook's syntax.
- "ansible-playbook playbooks/apache.yml --syntax-check"
- "ansible-playbook playbooks/php.yml --syntax-check"
- "ansible-playbook main.yml --syntax-check"
# Test the playbook.
- "ansible-playbook playbooks/apache.yml -u $(whoami)"
- "ansible-playbook playbooks/php.yml"
- "ansible-playbook main.yml"
# Test php
- "sphp 5.6; php -v"
- "sphp 7.1; php -v"
- "sphp 7.2; php -v"