strongloop-community / loopback-sdk-ios

iOS Client SDK for the LoopBack framework.
Other
76 stars 39 forks source link

Skip unit-tests on CI machines without xcodebuild #122

Closed bajtos closed 7 years ago

bajtos commented 7 years ago

Now that CIS uses devDependencies to trigger downstream builds, loopback-sdk-ios is triggered for pull requests in e.g. strong-remoting. Because the SDK requires xcodebuild to be installed, it fails on Linux-based CIS build slaves.

In this patch, I am adding a check to run-unit-tests script to skip the tests when xcodebuild is not available.

@rmg please review

cc @superkhau This is the only repository where we need ci.strongloop.com to run the tests on MacOSX. Ideally, the tests should be also triggered for pull requests in upstream repositories (loopback, strong-remoting, loopback-datasource-juggler, etc.).

superkhau commented 7 years ago

@bajtos TY for the update -- I added to the whitelist at https://github.com/strongloop-internal/loopback-knowledge-base/blob/master/ci.macos-whitelist.md#enabled

rmg commented 7 years ago

@bajtos can you think of any reason to install this module on any platform other than macOS? If not, we may want to consider adding "os" : [ "darwin"], to package.json. It is a property supported by npm and in the future I plan on using it to control which platforms to run tests on (along with engines.node and cpu).

bajtos commented 7 years ago

can you think of any reason to install this module on any platform other than macOS? If not, we may want to consider adding "os" : [ "darwin"], to package.json. It is a property supported by npm and in the future I plan on using it to control which platforms to run tests on (along with engines.node and cpu).

This module is not distributed via npm. The package.json file is listing dev-dependencies used by the test server and providing npm test script for our CI infrastructure.

I think adding "os" to package.json is a good idea - see https://github.com/strongloop/loopback-sdk-ios/pull/123