cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fil...@apache.org
Subject android commit: CB-12950: lots of tweaks for end-to-end test runs, especially on CI: - rename npm tasks to reflect what they do (npm run unit-tests, npm run e2e-tests). main `npm test` runs linter, unit tests and e2e tests now. - locked jasmine down to ~
Date Mon, 10 Jul 2017 20:00:50 GMT
Repository: cordova-android
Updated Branches:
  refs/heads/master 540929c6a -> 90053eb9d


CB-12950: lots of tweaks for end-to-end test runs, especially on CI:
- rename npm tasks to reflect what they do (npm run unit-tests, npm run e2e-tests). main `npm
test` runs linter, unit tests and e2e tests now.
- locked jasmine down to ~2.6.0.
- consolidate gitignores.
- updated travis to run `npm test`. add android sdk installation to appveyor ci run.align
android dpendencies across travis and appveyor. have appveyor install gradle. force gradle
to version 3.4.1 in appveyor, as that seems to be the only version choco has. explicitly invoke
sdkmanager to move license accepting process along.


Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/90053eb9
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/90053eb9
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/90053eb9

Branch: refs/heads/master
Commit: 90053eb9dfc03c6cdab31aab665324556c3358be
Parents: 540929c
Author: filmaj <maj.fil@gmail.com>
Authored: Tue Jun 27 12:02:38 2017 -0500
Committer: filmaj <maj.fil@gmail.com>
Committed: Tue Jun 27 15:59:16 2017 -0500

----------------------------------------------------------------------
 .gitignore                | 36 +++++++++++++++++++-----------------
 .travis.yml               |  6 ++----
 appveyor.yml              | 25 +++++++++++++++++++++----
 package.json              |  9 +++++----
 spec/e2e/jasmine.json     |  8 ++++++++
 spec/support/jasmine.json |  8 --------
 spec/unit/jasmine.json    |  8 ++++++++
 test/.gitignore           |  9 ---------
 8 files changed, 63 insertions(+), 46 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/90053eb9/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index ae64038..3be9ebd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,11 +1,21 @@
 .DS_Store
+.gradle
+.metadata
+Thumbs.db
+Desktop.ini
+*.tmp
+*.bak
+*.swp
+*.class
+*.jar
 default.properties
 gen
 assets/www/cordova.js
 local.properties
 proguard.cfg
-proguard.cfg
 proguard-project.txt
+example
+/coverage
 /framework/lib
 /framework/build
 /framework/bin
@@ -15,30 +25,23 @@ proguard-project.txt
 /framework/libs
 /framework/javadoc-public
 /framework/javadoc-private
-/test/libs
-example
-/test/bin
-/test/assets/www/.tmp*
-/test/assets/www/cordova.js
+/test/.externalNativeBuild
+/test/build.gradle
 /test/gradle
 /test/gradlew
 /test/gradlew.bat
+/test/assets/www/.tmp*
+/test/assets/www/cordova.js
+/test/bin
 /test/build
-.gradle
+/test/captures
+/test/libs
 tmp/**
-.metadata
 tmp/**/*
-Thumbs.db
-Desktop.ini
-*.tmp
-*.bak
-*.swp
-*.class
-*.jar
 !/spec/fixtures/org.test.plugins.dummyplugin/src/android/TestLib.jar
 # IntelliJ IDEA files
+**/.idea/**/*
 *.iml
-.idea
 npm-debug.log
 node_modules/jshint
 node_modules/promise-matchers
@@ -130,4 +133,3 @@ node_modules/wordwrap/
 node_modules/yargs/
 node_modules/jasmine-core/
 node_modules/fs.realpath/
-/coverage

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/90053eb9/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 7ad8eea..f4734d1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -9,14 +9,12 @@ before_install:
 install:
     - npm install
     - npm install -g codecov
-    - echo y | android update sdk -u --filter android-22,android-23,android-24,android-25
+    - echo y | android --silent update sdk --no-ui --all --filter platform-tools,tools,build-tools-26.0.0,android-26,android-25,extra-google-m2repository,extra-android-m2repository
 android:
     components:
       - tools
-      - tools
 script:
-    - npm run eslint
+    - npm test
     - npm run cover
-    - npm run test-build
 after_script:
     - codecov

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/90053eb9/appveyor.yml
----------------------------------------------------------------------
diff --git a/appveyor.yml b/appveyor.yml
index 24ea88a..f8bef7e 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,11 +1,29 @@
 environment:
+  ANDROID_HOME: "C:\\android"
   matrix:
   - nodejs_version: "4"
   - nodejs_version: "6"
 
+init:
+  - mkdir "%ANDROID_HOME%
+  - cd "%ANDROID_HOME%"
+  - appveyor DownloadFile "https://dl.google.com/android/repository/tools_r25.2.3-windows.zip"
+  - 7z x "tools_r25.2.3-windows.zip" > nul
+  - cd "C:\projects\cordova-android"
+
 install:
-#   - cinst android-sdk
-#   - echo y | android update sdk -u --filter android-22,android-23
+  - choco install gradle -version 3.4.1
+  - gradle -version
+  - echo y | "%ANDROID_HOME%\tools\android.bat" --silent update sdk --no-ui --all --filter
platform-tools,tools,build-tools-26.0.0,android-26,android-25,extra-google-m2repository,extra-android-m2repository
+  # on windows we need to accept sublicenses for the new tooling, wee. 30 is an arbitrary
number,
+  # but should be the maximum number of licenses we explicitly need to type "Y ENTER" for.
+  # also, the sdkmanager in all its glory leaks a bit of output to stderr, and powershell
+  # and appveyor interpret that as errors, and blows up. so, when piping in our "Y ENTER"
+  # responses, we invoke cmd so we can redirect stderr to stdout, and tell it to --update
itself.
+  - ps: for($i=0;$i -lt 30;$i++) { $response += "y`n"}; $response | cmd /c 'C:\android\tools\bin\sdkmanager.bat
2>&1' --update
+  - cd test
+  - gradle :wrapper -b build.gradle
+  - cd ..
   - ps: Install-Product node $env:nodejs_version
   - npm install
 
@@ -14,5 +32,4 @@ build: off
 test_script:
   - node --version
   - npm --version
-  - npm run test
-#   - npm run test-build
+  - npm test

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/90053eb9/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 5b78eb7..574de80 100644
--- a/package.json
+++ b/package.json
@@ -19,9 +19,10 @@
     "apache"
   ],
   "scripts": {
-    "test": "npm run eslint && jasmine",
-    "cover": "istanbul cover --root bin/templates/cordova --print detail jasmine",
-    "test-build": "jasmine --captureExceptions --color spec/e2e/*.spec.js",
+    "test": "npm run eslint && npm run unit-tests && npm run e2e-tests",
+    "unit-tests": "jasmine --config=spec/unit/jasmine.json",
+    "cover": "istanbul cover --root bin/templates/cordova --print detail jasmine -- --config=spec/unit/jasmine.json",
+    "e2e-tests": "jasmine --config=spec/e2e/jasmine.json",
     "eslint": "eslint bin && eslint spec"
   },
   "author": "Apache Software Foundation",
@@ -51,7 +52,7 @@
     "eslint-plugin-promise": "^3.5.0",
     "eslint-plugin-standard": "^3.0.1",
     "istanbul": "^0.4.2",
-    "jasmine": "^2.5.2",
+    "jasmine": "~2.6.0",
     "promise-matchers": "~0",
     "rewire": "^2.1.3"
   },

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/90053eb9/spec/e2e/jasmine.json
----------------------------------------------------------------------
diff --git a/spec/e2e/jasmine.json b/spec/e2e/jasmine.json
new file mode 100644
index 0000000..49c40b2
--- /dev/null
+++ b/spec/e2e/jasmine.json
@@ -0,0 +1,8 @@
+{
+    "spec_dir": "spec",
+    "spec_files": [
+        "e2e/**/*[sS]pec.js"
+    ],
+    "stopSpecOnExpectationFailure": false,
+    "random": false
+}

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/90053eb9/spec/support/jasmine.json
----------------------------------------------------------------------
diff --git a/spec/support/jasmine.json b/spec/support/jasmine.json
deleted file mode 100644
index e04f814..0000000
--- a/spec/support/jasmine.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-    "spec_dir": "spec",
-    "spec_files": [
-        "unit/**/*[sS]pec.js"
-    ],
-    "stopSpecOnExpectationFailure": false,
-    "random": false
-}

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/90053eb9/spec/unit/jasmine.json
----------------------------------------------------------------------
diff --git a/spec/unit/jasmine.json b/spec/unit/jasmine.json
new file mode 100644
index 0000000..4fe01a6
--- /dev/null
+++ b/spec/unit/jasmine.json
@@ -0,0 +1,8 @@
+{
+    "spec_dir": "spec",
+    "spec_files": [
+        "unit/**/*[sS]pec.js"
+    ],
+    "stopSpecOnExpectationFailure": false,
+    "random": true
+}

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/90053eb9/test/.gitignore
----------------------------------------------------------------------
diff --git a/test/.gitignore b/test/.gitignore
deleted file mode 100644
index 39fb081..0000000
--- a/test/.gitignore
+++ /dev/null
@@ -1,9 +0,0 @@
-*.iml
-.gradle
-/local.properties
-/.idea/workspace.xml
-/.idea/libraries
-.DS_Store
-/build
-/captures
-.externalNativeBuild


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message