chore(ci): Add travis configuration
This commit is contained in:
Родитель
6917474374
Коммит
a0cc5cefb1
|
@ -1,3 +1,5 @@
|
|||
data/content/
|
||||
logs/
|
||||
test/
|
||||
node_modules/
|
||||
firefox/
|
||||
|
|
|
@ -5,3 +5,4 @@ npm-debug.log
|
|||
logs/
|
||||
dist/
|
||||
data/content/
|
||||
firefox/
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
language: node_js
|
||||
|
||||
node_js:
|
||||
- "5.5.0"
|
||||
|
||||
before_install:
|
||||
- "export DISPLAY=:99.0"
|
||||
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16 -extension RANDR"
|
||||
|
||||
before_script:
|
||||
- cd $TRAVIS_BUILD_DIR
|
||||
- ./node_modules/.bin/mozilla-download --branch mozilla-central --product firefox firefox
|
||||
- export FIREFOX_PATH=$TRAVIS_BUILD_DIR/firefox/firefox
|
||||
- export PATH=$FIREFOX_PATH:$PATH
|
||||
- firefox -v
|
||||
|
||||
script:
|
||||
- npm run travis
|
|
@ -1,5 +1,10 @@
|
|||
# Activity Streams Add-on
|
||||
|
||||
## Tests
|
||||
|
||||
Run `npm tests` to run the tests once. Run `npm run help` for more options.
|
||||
|
||||
|
||||
## ActionManager
|
||||
When you instantiate an `ActionManager`, you give it a list of types which are valid for the application. If at any time you try to create an action with a type that isn't part of that list, it will throw an error. Yay!
|
||||
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
"karma-chai": "^0.1.0",
|
||||
"karma-chai-as-promised": "^0.1.2",
|
||||
"karma-coverage": "^0.5.3",
|
||||
"karma-coveralls": "^1.1.2",
|
||||
"karma-firefox-launcher": "^0.1.7",
|
||||
"karma-html2js-preprocessor": "^0.1.0",
|
||||
"karma-mocha": "^0.2.1",
|
||||
|
@ -56,6 +57,7 @@
|
|||
"karma-webpack": "^1.7.0",
|
||||
"live-server": "^0.9.1",
|
||||
"mocha": "^2.4.5",
|
||||
"mozilla-download": "^1.1.1",
|
||||
"node-sass": "^3.4.2",
|
||||
"npm-run-all": "^1.5.1",
|
||||
"requirejs": "^2.1.22",
|
||||
|
@ -81,6 +83,10 @@
|
|||
"test:karma": "karma start",
|
||||
"tdd": "karma start --no-single-run",
|
||||
"package": "jpm xpi && mv @activity-streams-$npm_package_version.xpi dist/activity-streams-$npm_package_version.xpi",
|
||||
"travis": "npm-run-all travis:*",
|
||||
"travis:eslint": "npm run test:lint",
|
||||
"travis:jpm": "jpm test -b $FIREFOX_PATH",
|
||||
"travis:karma": "karma start --reporters mocha,coverage,coveralls",
|
||||
"precommit": "npm run test:lint && npm run yamscripts",
|
||||
"help": "yamscripts help",
|
||||
"yamscripts": "yamscripts compile",
|
||||
|
|
|
@ -22,20 +22,28 @@ scripts:
|
|||
# firefox: Launch addon with jpm run
|
||||
firefox: jpm run -b nightly
|
||||
|
||||
# test: Run tests with eslint, jpm
|
||||
# test: Run all tests once
|
||||
test:
|
||||
# test:lint: Run eslint
|
||||
lint: eslint .
|
||||
# test:jpm: Run jpm tests
|
||||
jpm: jpm test
|
||||
# test:karma: Run content tests only
|
||||
karma: karma start
|
||||
|
||||
# tdd: Run tests continuously
|
||||
# tdd: Run content tests continuously
|
||||
tdd: karma start --no-single-run
|
||||
|
||||
# package: Build add-on
|
||||
package: jpm xpi && mv @activity-streams-$npm_package_version.xpi dist/activity-streams-$npm_package_version.xpi
|
||||
|
||||
# This is for ci
|
||||
travis:
|
||||
eslint: =>test:lint
|
||||
jpm: jpm test -b $FIREFOX_PATH
|
||||
karma: karma start --reporters mocha,coverage,coveralls
|
||||
|
||||
# This is just to make sure we don't make commits with failing tests
|
||||
# or uncompiled yamscripts.yml. Run automatically with husky.
|
||||
# This is just to make sure we don't make commits with failing tests
|
||||
# or uncompiled yamscripts.yml. Run automatically with husky.
|
||||
precommit: =>test:lint && =>yamscripts
|
||||
# prepush: =>test
|
||||
|
|
Загрузка…
Ссылка в новой задаче