You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ja...@apache.org on 2019/05/08 15:49:02 UTC
[cordova-plugin-splashscreen] branch master updated: CI: Use
universal paramedic travis.yml (#210)
This is an automated email from the ASF dual-hosted git repository.
janpio pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-plugin-splashscreen.git
The following commit(s) were added to refs/heads/master by this push:
new 6800de2 CI: Use universal paramedic travis.yml (#210)
6800de2 is described below
commit 6800de23b168b3de143ee3f91c1efcaba9309de8
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Wed May 8 17:48:57 2019 +0200
CI: Use universal paramedic travis.yml (#210)
---
.travis.yml | 36 +++++++++++++++++++++++++-----------
1 file changed, 25 insertions(+), 11 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 4284895..9f758c4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,6 +2,7 @@ sudo: false
addons:
jwt:
+ # sauce labs key
secure: UmbBQ73ydIzhTCfaTb/g0beTwnOHjYxlILmQYK2Tl9Gna/KbpawiVmbloX1eZakevkeYgzQmAHEF0LyDINy5AUk97azYeP0Sz/IOjIDfXAdc6U6sZb7BScneBMt6ET/hCprG4f3mbmleQ+gx+dmNWez6rlb3Xu+XWfJuwDfAWm0=
env:
@@ -37,6 +38,8 @@ _android: &_android
matrix:
include:
# one local test, without saucelabs
+ - env: PLATFORM=local/browser
+ <<: *_ios
- env: PLATFORM=local/ios-10.0
<<: *_ios
@@ -71,22 +74,33 @@ matrix:
<<: *_android
before_install:
- # `language: android` has no Node.js installed, therefore we need to install it manually
- - if [[ "$PLATFORM" =~ android ]]; then nvm install $TRAVIS_NODE_VERSION; fi
+ # manually install Node for `language: android`
+ - if [[ "$PLATFORM" =~ android ]]; then nvm install $TRAVIS_NODE_VERSION; fi
- node --version
- - if [[ "$PLATFORM" =~ ios ]]; then npm install -g ios-deploy; fi
- - if [[ "$PLATFORM" =~ local ]]; then npm install -g ios-deploy; fi
- if [[ "$PLATFORM" =~ android ]]; then gradle --version; fi
-
- - npm install -g github:apache/cordova-paramedic
- - PARAMEDIC_BUILDNAME=travis-plugin-splashscreen-$TRAVIS_JOB_NUMBER
-
+ - if [[ "$PLATFORM" =~ ios ]]; then npm install -g ios-deploy; fi
- npm install -g cordova
+ # install paramedic if not running on paramedic repo
+ - if ! [[ "$TRAVIS_REPO_SLUG" =~ cordova-paramedic ]]; then npm install -g github:apache/cordova-paramedic; fi
install:
- npm install
+before_script:
+ - |
+ if [[ "$TRAVIS_REPO_SLUG" =~ cordova-paramedic ]]; then
+ # when used in the cordova-paramedic repo
+ TEST_COMMAND="npm run eslint"
+ PARAMEDIC_PLUGIN_TO_TEST=""./spec/testable-plugin/""
+ PARAMEDIC_COMMAND="node main.js"
+ else
+ # when used in any other (plugin) repo
+ TEST_COMMAND="npm test"
+ PARAMEDIC_PLUGIN_TO_TEST=$(pwd)
+ PARAMEDIC_COMMAND="cordova-paramedic"
+ fi
+ - PARAMEDIC_BUILDNAME=travis-$TRAVIS_REPO_SLUG-$TRAVIS_JOB_NUMBER
+
script:
-- npm test
-- if [[ "$PLATFORM" != local* ]]; then cordova-paramedic --config pr/$PLATFORM --plugin $(pwd) --buildName $PARAMEDIC_BUILDNAME --shouldUseSauce; fi
-- if [[ "$PLATFORM" =~ local ]]; then cordova-paramedic --config pr/$PLATFORM --plugin $(pwd) --buildName $PARAMEDIC_BUILDNAME; fi
+ - $TEST_COMMAND
+ - $PARAMEDIC_COMMAND --config ./pr/$PLATFORM --plugin $PARAMEDIC_PLUGIN_TO_TEST --buildName $PARAMEDIC_BUILDNAME
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org