Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(travis): Update Travis CI configuration for new paramedic #465

Closed
wants to merge 3 commits into from

Conversation

erisu
Copy link
Member

@erisu erisu commented Apr 24, 2019

Platforms affected

none

Motivation and Context

  • Match Paramedic Test
  • Update Package.json

Description

  • Updated Travis CI to test local and same set of platforms that paramedic tests.
  • Updated package.json

Testing

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

@erisu
Copy link
Member Author

erisu commented Apr 24, 2019

Tagging: apache/cordova#72

package.json Outdated
@@ -15,10 +15,11 @@
},
"repository": {
"type": "git",
"url": "https://github.com/apache/cordova-plugin-inappbrowser"
"url": "github:apache/cordova-plugin-inappbrowser"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be the complete shorthand syntax?
"repository": "github:apache/cordova-plugin-inappbrowser" - personally I'd drop the github: part, too. Recent npm versions should be intelligent enough to resolve this to GitHub

Copy link
Member Author

@erisu erisu Apr 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just wrote a script that updated the existing URL. I didn't think of shortening the entire field to a string.

Yeah we can shorten it more.

https://docs.npmjs.com/files/package.json#repository

I wonder what is the order of priority if you dropped GitHub from the string.

"repository": "npm/npm"
"repository": "github:user/repo"
"repository": "gist:11081aaa281"
"repository": "bitbucket:user/repo"
"repository": "gitlab:user/repo"

Might be bad if someone else took our exist same username and repo name for in another git service and NPM decided to use the wrong one.. Or one day they screw up the order of priority.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That could happen, but I don't believe it's that probable ;)
Having github: doesn't hurt though.

.travis.yml Outdated
- node /tmp/paramedic/main.js --config pr/$PLATFORM --plugin $(pwd) --shouldUseSauce
--buildName travis-plugin-inappbrowser-$TRAVIS_JOB_NUMBER
- if [[ "$PLATFORM" != local ]]; then cordova-paramedic --config pr/$PLATFORM --plugin $(pwd) --buildName $PARAMEDIC_BUILDNAME --shouldUseSauce; fi
- if [[ "$PLATFORM" =~ local ]]; then cordova-paramedic --config pr/local/ios-10.0 --plugin $(pwd) --buildName $PARAMEDIC_BUILDNAME; fi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's interesting. I dislike the hardcoding of ios-10.0 down here, but like that it doesn't reroute through package.json/npm script.

Copy link
Member Author

@erisu erisu Apr 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the --config value is append at paramedic's conf directory path, I was thinking what if PLATFORM was changed to local/ios-10 instead.

Then the line will remain as

- if [[ "$PLATFORM" =~ local ]]; then cordova-paramedic --config pr/$PLATFORM --plugin $(pwd) --buildName $PARAMEDIC_BUILDNAME; fi

Though PLATFORM=local/ios-10, "$PLATFORM" =~ local will still match.

Only thing is I have not looked into is if this environment variable is used within paramedic code... if not and only within this yaml file, I think it will be OK to change as well.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good!

@janpio
Copy link
Member

janpio commented Apr 24, 2019

Interesting test failure on Xcode 10.2, iOS 12.2:

https://travis-ci.org/apache/cordova-plugin-inappbrowser/jobs/523799304

cordova-paramedic: connecting webdriver
....................................................................
No webview context. Retries remaining: 2
cordova-paramedic: Tests failed to complete; ending appium session. The error is:
Error: [context("WEBVIEW_5250.2")] Error response status: 13, UnknownError - An unknown server-side error occurred while processing the command. Selenium error: An unknown server-side error occurred while processing the command. Original error: Remote debugger error with code '-32601': 'Page' domain was not found
    at exports.newError (/Users/travis/.nvm/versions/node/v6.17.1/lib/node_modules/cordova-paramedic/node_modules/wd/lib/utils.js:152:13)
    at /Users/travis/.nvm/versions/node/v6.17.1/lib/node_modules/cordova-paramedic/node_modules/wd/lib/callbacks.js:36:19
    at /Users/travis/.nvm/versions/node/v6.17.1/lib/node_modules/cordova-paramedic/node_modules/wd/lib/webdriver.js:194:5
    at Request._callback (/Users/travis/.nvm/versions/node/v6.17.1/lib/node_modules/cordova-paramedic/node_modules/wd/lib/http-utils.js:89:7)
    at Request.self.callback (/Users/travis/.nvm/versions/node/v6.17.1/lib/node_modules/cordova-paramedic/node_modules/request/request.js:185:22)
    at emitTwo (events.js:106:13)
    at Request.emit (events.js:191:7)
    at Request.<anonymous> (/Users/travis/.nvm/versions/node/v6.17.1/lib/node_modules/cordova-paramedic/node_modules/request/request.js:1161:10)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:188:7)
From previous event:
    at ParamedicSauceLabs.runSauceTests (/Users/travis/.nvm/versions/node/v6.17.1/lib/node_modules/cordova-paramedic/lib/ParamedicSauceLabs.js:459:14)
    at ParamedicRunner.runTests (/Users/travis/.nvm/versions/node/v6.17.1/lib/node_modules/cordova-paramedic/lib/paramedic.js:328:58)
    at Q.then.then.then (/Users/travis/.nvm/versions/node/v6.17.1/lib/node_modules/cordova-paramedic/lib/paramedic.js:89:29)

https://app.saucelabs.com/tests/2c2ca315b8af49bd8a8e5b34409032a8

@janpio
Copy link
Member

janpio commented Apr 24, 2019

appium/appium#12510 and appium/appium#12518 sound related - second one has a possible workaround/solution to look into.

@erisu
Copy link
Member Author

erisu commented Apr 24, 2019

@janpio thanks for the two appium tickets as references, I will look into them.

Copy link
Contributor

@purplecabbage purplecabbage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn’t be sending people to dev@cordova.apache.org just discuss in the issue thread. I have to approve people to send mail there ...
The rest looks great.

@erisu
Copy link
Member Author

erisu commented Apr 25, 2019

@purplecabbage I can drop the email. I only added it to be consistent with other repos that already had it. I will make sure to remove it from the other repos as well when I come across them.

@purplecabbage
Copy link
Contributor

purplecabbage commented Apr 25, 2019 via email

@janpio
Copy link
Member

janpio commented May 10, 2019

Newer version of the travis.yml is no suggested for merge in #478 (but is failing for the same reasons)

@janpio janpio changed the title Updated Travis CI Settings and Package.json ci(travis): Update Travis CI configuration for new paramedic Jun 18, 2019
@janpio janpio closed this Jun 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants