Skip to content

Commit

Permalink
Merge pull request #7 from RoboticCheese/jdh-add-windows-tester
Browse files Browse the repository at this point in the history
Update build configs + add Windows testing
  • Loading branch information
hartmantis committed Aug 26, 2015
2 parents 52416ab + 31e37bb commit e37d500
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 13 deletions.
7 changes: 7 additions & 0 deletions .kitchen.appveyor.yml
@@ -0,0 +1,7 @@
---
driver:
name: localhost
clean_up_on_destroy: false

platforms:
- name: windows
7 changes: 3 additions & 4 deletions .kitchen.travis.yml
@@ -1,8 +1,7 @@
---
driver:
name: digitalocean
name: localhost
clean_up_on_destroy: false

platforms:
- name: macosx
driver:
name: localhost
- name: macosx-travis
4 changes: 4 additions & 0 deletions .kitchen.yml
Expand Up @@ -23,6 +23,10 @@ suites:
- name: enable_and_start
run_list:
- recipe[plex-home-theater_test::enable_and_start]
attributes:
excludes:
- macosx-travis
- name: uninstall
run_list:
- recipe[plex-home-theater_test::uninstall]
attributes:
11 changes: 7 additions & 4 deletions .travis.yml
@@ -1,16 +1,19 @@
language: ruby
language: objective-c

branches:
only:
- master

install:
- curl -L https://www.chef.io/chef/install.sh | sudo bash -s -- -P chefdk
- chef exec bundle install --without=development integration
- chef exec bundle update

before_script:
# Pending ENV support in Kitchen's Rake tasks and not just the CLI
- cp .kitchen.travis.yml .kitchen.local.yml
- echo -e $DIGITALOCEAN_SSH_KEY_BODY > ~/.ssh/id_rsa

script:
- chef exec rake
- chef exec bundle exec rake && chef exec bundle exec kitchen test -c 3

after_script:

Expand Down
1 change: 0 additions & 1 deletion Gemfile
Expand Up @@ -23,7 +23,6 @@ group :test do
gem 'coveralls'
gem 'fauxhai'
gem 'test-kitchen'
gem 'kitchen-digitalocean', '>= 0.8.0'
gem 'kitchen-localhost'
gem 'kitchen-vagrant'
gem 'winrm-transport'
Expand Down
4 changes: 3 additions & 1 deletion README.md
@@ -1,12 +1,14 @@
Plex Home Theater Cookbook
==========================
[![Cookbook Version](https://img.shields.io/cookbook/v/plex-home-theater.svg)][cookbook]
[![Build Status](https://img.shields.io/travis/RoboticCheese/plex-home-theater-chef.svg)][travis]
[![OS X Build Status](https://img.shields.io/travis/RoboticCheese/plex-home-theater-chef.svg)][travis]
[![Windows Build Status](https://img.shields.io/appveyor/ci/RoboticCheese/plex-home-theater-chef.svg)][appveyor]
[![Code Climate](https://img.shields.io/codeclimate/github/RoboticCheese/plex-home-theater-chef.svg)][codeclimate]
[![Coverage Status](https://img.shields.io/coveralls/RoboticCheese/plex-home-theater-chef.svg)][coveralls]

[cookbook]: https://supermarket.chef.io/cookbooks/plex-home-theater
[travis]: https://travis-ci.org/RoboticCheese/plex-home-theater-chef
[appveyor]: https://ci.appveyor.com/project/RoboticCheese/plex-home-theater-chef
[codeclimate]: https://codeclimate.com/github/RoboticCheese/plex-home-theater-chef
[coveralls]: https://coveralls.io/r/RoboticCheese/plex-home-theater-chef

Expand Down
17 changes: 17 additions & 0 deletions appveyor.yml
@@ -0,0 +1,17 @@
branches:
only:
- master

cache:
- '%TEMP%\verifier\gems'

install:
- cinst chefdk
- SET PATH=C:\opscode\chefdk\bin;%PATH%

build_script:
- chef exec bundle update
- copy .kitchen.appveyor.yml .kitchen.local.yml

test_script:
- chef exec bundle exec kitchen test -c 3
Expand Up @@ -19,7 +19,7 @@
describe command(
'osascript -e \'tell application "System Events" to get the name of the ' \
'login item "Plex Home Theater"\''
), if: os[:family] == 'darwin' do
), if: os[:family] == 'darwin' do
it 'indicates Plex Home Theater is enabled' do
expect(subject.stdout.strip).to eq('Plex Home Theater')
end
Expand All @@ -33,9 +33,13 @@
end
end

describe process('Plex Home Theater'), if: os[:family] == 'darwin' do
# TODO: Using process('Plex Home Theater') requires a fix for Specinfra to
# not try to use `ps -C` in OS X.
describe command(
'ps -A -c -o command | grep Plex\ Home\ Theater'
), if: os[:family] == 'darwin' do
it 'is running' do
expect(subject).to be_running
expect(subject.stdout.strip).to eq('Plex Home Theater')
end
end

Expand Down

0 comments on commit e37d500

Please sign in to comment.