---
osx_image: xcode8
language:
  - objective-c
install:
  - brew update
  - brew install ansible
  - ansible --version
before_script:
  - rm ~/.bashrc
  - rm ~/.zshrc
  - brew doctor || true
script:
  - ansible-playbook -i ansible/inventory --syntax-check --list-tasks ansible/dotfiles.yml
  - ansible-playbook -i ansible/inventory ansible/dotfiles.yml --skip-tags "packages"
  - >
    ansible-playbook -i ansible/inventory ansible/dotfiles.yml --skip-tags "packages"
    | grep -q 'changed=0.*failed=0'
    && (echo 'Idempotence test: pass' && exit 0)
    || (echo 'Idempotence test: fail' && exit 1)
after_script:
  - brew doctor || true
  - brew list
  - brew cleanup
  - brew cask cleanup

---
osx_image: xcode8.2
language:
  - objective-c
install:
  - brew update
  - brew install ansible
  - ansible --version
before_script:
  - rm ~/.bashrc
  - rm ~/.zshrc
  - brew doctor || true
script:
  - ansible-playbook -i ansible/inventory --syntax-check --list-tasks ansible/dotfiles.yml
  - ansible-playbook -i ansible/inventory ansible/dotfiles.yml --skip-tags "packages"
  - >
    ansible-playbook -i ansible/inventory ansible/dotfiles.yml --skip-tags "packages"
    | grep -q 'changed=0.*failed=0'
    && (echo 'Idempotence test: pass' && exit 0)
    || (echo 'Idempotence test: fail' && exit 1)
after_script:
  - brew doctor || true
  - brew list
  - brew cleanup
  - brew cask cleanup

Update Travis CI to macOS 10.12
Update Travis CI to macOS 10.12
