YorkShen commented on a change in pull request #2731: Add Lint in TravisCI and 
Update iOS TravisCI
URL: https://github.com/apache/incubator-weex/pull/2731#discussion_r307625891
 
 

 ##########
 File path: .travis.yml
 ##########
 @@ -106,10 +140,60 @@ script:
         hasIosFile=$(npm run danger -- run --dangerfile ./dangerfile-ios.js)
         echo "The value of hasIosFile is ${hasIosFile}"
         if [[ "$hasIosFile" =~ "hasIosFile" ]]; then
-          xcodebuild -project ios/sdk/WeexSDK.xcodeproj test -scheme 
WeexSDKTests CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO -destination 
"platform=iOS Simulator,name=iPhone 6"
+          # build WeexSDK and run WeexSDKTests
+          xcodebuild -project ios/sdk/WeexSDK.xcodeproj test -scheme 
WeexSDKTests CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO -destination 
"platform=iOS Simulator,name=iPhone 6" || exit 1
+          # build WeexDemo and run WeexDemo test
+          cd weex-playground/ios && mkdir tmp && mv * tmp;cd tmp
+          xcodebuild -workspace WeexDemo.xcworkspace test -scheme WeexDemo 
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO -destination "platform=iOS 
Simulator,name=iPhone 6" || exit 1
         fi
         ;;
     esac
+    
+    if [[ ("${STATIC_CODE_ANALYSIS}" = "true") && ("${CHECK_C}" = "true") ]]; 
then
+      hasCFile=$(npm run danger -- run --dangerfile 
./dangerfile-static-check.js)
+      echo "The value of hasCFile is ${hasCFile}"
+      if [[ "$hasCFile" =~ "hasCFile" ]]; then
+        echo "hasCFile"
+        cd ios/sdk && xcodebuild | xcpretty -r json-compilation-database -o 
compile_commands.json
+        oclint-json-compilation-database oclint_args -- \
 
 Review comment:
   But if you didn't out the result of the oc_lint through `danger`, there is 
no way for contributors to know what is wrong. Generally no one will read the 
raw log of Travis if build is success.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to