Skip to content
Permalink
Browse files

Add CI Testing (Islandora-Devops#3)

* Add testing to role

Testing is based on how geerlingguy test roles.

* Add fancy README badge.
  • Loading branch information...
jonathangreen authored and dannylamb committed Feb 7, 2018
1 parent b98c3d3 commit 8ea74863baaad9546fa98d01dd0f3387bc93da8e
Showing with 50 additions and 4 deletions.
  1. +2 −0 .gitignore
  2. +14 −0 .travis.yml
  3. +6 −4 README.md
  4. +2 −0 tasks/install.yml
  5. +26 −0 tests/test.yml
@@ -0,0 +1,2 @@
tests/test.sh
*.retry
@@ -0,0 +1,14 @@
---
services: docker

env:
- distro: centos7
- distro: ubuntu1604

script:
# Download test shim.
- wget -O ${PWD}/tests/test.sh https://gist.githubusercontent.com/geerlingguy/73ef1e5ee45d8694570f334be385e181/raw/
- chmod +x ${PWD}/tests/test.sh

# Run tests.
- ${PWD}/tests/test.sh
@@ -1,4 +1,4 @@
# Ansible Role: Grok
# Ansible Role: Grok [![Build Status](https://travis-ci.org/Islandora-Devops/ansible-role-grok.svg?branch=master)](https://travis-ci.org/Islandora-Devops/ansible-role-grok)

An Ansible role that installs [Grok](https://github.com/GrokImageCompression/grok) on:

@@ -21,14 +21,16 @@ grok_version_tag: v2.3.0

## Dependencies

* None
* Playbook requires the following applciations to be installed:
- git
- build-essential (gcc, g++, make)

## Example Playbook

- hosts: webservers
roles:
- { role: islandora.grok }
- islandora.grok

## License

MIT
MIT
@@ -3,6 +3,8 @@
- name: Install Grok dependencies (apt)
apt:
name: "{{ item }}"
update_cache: yes
cache_valid_time: 600
with_items:
- cmake
- libpng16-dev
@@ -0,0 +1,26 @@
---
- hosts: all

pre_tasks:
- name: Install dependancies (apt)
apt:
update_cache: yes
cache_valid_time: 600
name: "{{ item }}"
with_items:
- git
- build-essential
when: ansible_os_family == 'Debian'

- name: Install dependancies (yum)
yum:
name: "{{ item }}"
with_items:
- git
- gcc
- gcc-c++
- make
when: ansible_os_family == 'RedHat'

roles:
- role_under_test

0 comments on commit 8ea7486

Please sign in to comment.
You can’t perform that action at this time.