Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

update stages and build matrices (#3308)

Christopher Hillerff9f3cfad487
diff --git a/.travis.yml b/.travis.yml
index fac2e3b1..ffbbb5d4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,44 +1,60 @@
-# trusty dist provides a modern build chain (as opposed to 'precise' dist)
-# which absolves us from having to install compilers and stuff
-dist: trusty
+# these are executed in order. each must pass for the next to be run
+stages:
+ - smoke # this ensures a "user" install works properly
+ - lint # lint code and docs
+ - test # all tests
+# defaults
language: node_js
+node_js: '9'
+cache:
+ directories:
+ - ~/.npm
+ - node_modules
-matrix:
- fast_finish: true
+jobs:
+ include:
+ - script: COVERAGE=1 npm start test.node
+ after_success: npm start coveralls
-before_install: scripts/travis-before-install.sh
+ - &node
+ script: npm start test.node
+ node_js: '8'
+ cache: false
-before_script: scripts/travis-before-script.sh
+ - <<: *node
+ node_js: '6'
+
+ - <<: *node
+ node_js: '4'
+
+ - script: npm start test.bundle test.browser
+ before_script: mkdir -p .karma
+ addons:
+ artifacts:
+ paths:
+ - .karma/
+ - ./mocha.js
+ chrome: stable
+ sauce_connect: true
-jobs:
- include:
- stage: lint
+ script: npm start lint
+
+ - &smoke
+ stage: smoke
+ env: NPM_CONFIG_PRODUCTION=1
+ script: ./bin/mocha --opts /dev/null --reporter spec test/sanity/sanity.spec.js
+ cache: false
+
+ - <<: *smoke
node_js: '8'
- env: TARGET=lint
- script: npm start $TARGET
- - stage: test
- node_js: '9'
- env: TARGET=test.node COVERAGE=true
- script: npm start $TARGET
- - node_js: '8'
- env: TARGET=test.node
- script: npm start $TARGET
- - node_js: '6'
- env: TARGET=test.node
- script: npm start $TARGET
- - node_js: '4'
- env: TARGET=test.node
- script: npm start $TARGET
- - node_js: '8'
- env: TARGET=test.browser
- script: npm start $TARGET
-stages:
- - lint
- - test
+ - <<: *smoke
+ node_js: '6'
-after_success: npm start coveralls
+ - <<: *smoke
+ node_js: '4'
notifications:
email: false
@@ -49,15 +65,3 @@ notifications:
- secure: rGMGYWBaZgEa9i997jJHKzjI8WxECqLi6BqsMhvstDq9EeTeXkZFVfz4r6G3Xugsk3tFwb/pDpiYo1OK36kA5arUJTCia51u4Wn+c7lHKcpef/vXztoyucvw6/jXdVm/FQz1jztYYbqdyAOWC2BV8gYvg5F8TpK05UGCe5R0bRA=
on_success: change
on_failure: always
-
-addons:
- artifacts:
- paths:
- - .karma/
- - ./mocha.js
- sauce_connect: true
- chrome: stable
-cache:
- directories:
- - ~/.npm
- - node_modules
diff --git a/package-lock.json b/package-lock.json
index 22a30ddf..f362788b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1025,7 +1025,7 @@
"browser-stdout": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz",
- "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw=="
+ "integrity": "sha1-uqVZ7hTO1zRSIputcyZGfGH6vWA="
},
"browserify": {
"version": "14.4.0",
@@ -1687,7 +1687,7 @@
"commander": {
"version": "2.11.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz",
- "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ=="
+ "integrity": "sha1-FXFS/R56bI2YpbcVzzdt+SgARWM="
},
"comment-regex": {
"version": "1.0.0",
@@ -2246,7 +2246,7 @@
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
- "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
+ "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=",
"requires": {
"ms": "2.0.0"
}
@@ -2622,7 +2622,7 @@
"diff": {
"version": "3.5.0",
"resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
- "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA=="
+ "integrity": "sha1-gAwN0eCov7yVg1wgKtIg/jF+WhI="
},
"diffie-hellman": {
"version": "5.0.2",
@@ -4962,7 +4962,7 @@
"glob": {
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
- "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
+ "integrity": "sha1-wZyd+aAocC1nhhI4SmVSQExjbRU=",
"requires": {
"fs.realpath": "1.0.0",
"inflight": "1.0.6",
@@ -5200,7 +5200,7 @@
"growl": {
"version": "1.10.3",
"resolved": "https://registry.npmjs.org/growl/-/growl-1.10.3.tgz",
- "integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q=="
+ "integrity": "sha1-GSa6kM8+3+KttJJ/WIC8IsZseQ8="
},
"gulp-decompress": {
"version": "1.2.0",
@@ -7281,7 +7281,7 @@
"minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
- "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+ "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=",
"requires": {
"brace-expansion": "1.1.8"
}
@@ -13716,7 +13716,7 @@
"supports-color": {
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz",
- "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==",
+ "integrity": "sha1-iD992rwWUUKyphQn8zUt7RldGj4=",
"requires": {
"has-flag": "2.0.0"
}
diff --git a/scripts/travis-before-install.sh b/scripts/travis-before-install.sh
deleted file mode 100755
index d33eeaef..00000000
--- a/scripts/travis-before-install.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env bash
-
-runSanityTest () {
- # avoids our mocha.opts (and thus devDependencies) in a roundabout way
- ./bin/mocha --opts /dev/null --reporter spec test/sanity/sanity.spec.js
-}
-
-npm install --production
-runSanityTest
diff --git a/scripts/travis-before-script.sh b/scripts/travis-before-script.sh
deleted file mode 100755
index 3e8a45c0..00000000
--- a/scripts/travis-before-script.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-# bundle artifacts to AWS go here
-mkdir -p .karma