Skip to content

Commit 94372da

Browse files
authored
CI Fixes due to unit tests (#222)
1 parent f00af15 commit 94372da

File tree

2 files changed

+24
-8
lines changed

2 files changed

+24
-8
lines changed

.travis.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
1-
language: node_js
1+
os: osx
2+
osx_image: xcode8.3
23
sudo: false
4+
env:
5+
matrix:
6+
- TRAVIS_NODE_VERSION: '4'
7+
- TRAVIS_NODE_VERSION: '6'
38
git:
49
depth: 10
5-
node_js:
6-
- '4'
7-
- '6'
10+
before_install:
11+
- rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm
12+
&& git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm
13+
install $TRAVIS_NODE_VERSION
14+
- node --version
815
install:
916
- npm install
1017
script:

spec/commands.spec.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,29 @@
1717
under the License.
1818
*/
1919
var commands = require('../src/commands');
20+
var os = require('os');
2021

2122
describe('commands end-to-end', function() {
2223

2324
beforeEach(function() {
24-
commands.init();
25+
if (os.platform() === 'darwin') {
26+
commands.init();
27+
}
2528
});
2629

2730
afterEach(function() {
2831
});
2932

3033
it('command - showsdks', function() {
31-
commands.showsdks({ 'no-output': true });
34+
if (os.platform() === 'darwin') {
35+
commands.showsdks({ 'no-output': true });
36+
}
3237
});
3338

3439
it('command - showdevicetypes', function() {
35-
commands.showdevicetypes({ 'no-output': true });;
40+
if (os.platform() === 'darwin') {
41+
commands.showdevicetypes({ 'no-output': true });
42+
}
3643
});
3744

3845
it('command - launch', function() {
@@ -47,6 +54,8 @@ describe('commands end-to-end', function() {
4754

4855
it('command - start', function() {
4956
var devicetypeid = 'iPhone-6';
50-
commands.start({ 'devicetypeid': devicetypeid });
57+
if (os.platform() === 'darwin') {
58+
commands.start({ 'devicetypeid': devicetypeid });
59+
}
5160
});
5261
});

0 commit comments

Comments
 (0)