Skip to content

Commit

Permalink
Merge pull request telus#1 from noqcks/master
Browse files Browse the repository at this point in the history
Added travis-ci tests for the fish role
  • Loading branch information
aaronpederson committed Aug 26, 2015
2 parents 6b2a375 + fd923f6 commit ff095a5
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .travis.yml
@@ -0,0 +1,38 @@
---
language: python
python: "2.7"

env:
- SITE=test-install.yml

before_install:
- sudo apt-get update -qq
- sudo apt-get install -y curl

install:
# Install Ansible.
- pip install ansible

# Add ansible.cfg to pick up roles path.
- "{ echo '[defaults]'; echo 'roles_path = ../'; } >> ansible.cfg"

# Install dependencies
- ansible-galaxy install telusdigital.apt-repository

script:
# Check the role/playbook's syntax.
- "ansible-playbook -i tests/inventory tests/$SITE --syntax-check"

# Run the role/playbook with ansible-playbook.
- "ansible-playbook -i tests/inventory tests/$SITE --connection=local --sudo"

# Run the role/playbook again, checking to make sure it's idempotent.
- >
fish -v
|& grep -q 'fish, version'
&& (echo 'Fish installed')
|| (echo 'Fish not installed')
# Just for good measure
- fish -v

1 change: 1 addition & 0 deletions README.md
Expand Up @@ -25,3 +25,4 @@ License
Contributors
------------
* [Chris Olstrom](https://colstrom.github.io/) | [e-mail](mailto:chris@olstrom.com) | [Twitter](https://twitter.com/ChrisOlstrom)

1 change: 1 addition & 0 deletions tests/inventory
@@ -0,0 +1 @@
localhost
8 changes: 8 additions & 0 deletions tests/test-install.yml
@@ -0,0 +1,8 @@
---
- hosts: localhost
remote_user: root
roles:
- role: telusdigital.apt-repository
repository_key: "0x27557f056dc33ca5"
repository_url: "deb http://ppa.launchpad.net/fish-shell/release-2/ubuntu {{ ansible_distribution_release }} main"
- role: ansible-fish

0 comments on commit ff095a5

Please sign in to comment.