This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
forked from mozilla-jetpack/jpm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
49 lines (49 loc) · 1.64 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
sudo: false
language: node_js
node_js:
- '0.10'
- '4'
- '5'
- '6'
notifications:
irc: irc.mozilla.org#jpm
before_install:
# Create a master branch for conventional-changelog-lint
- git remote set-branches origin master && git fetch
- git checkout master
# Check out the commit that TravisCI started on:
- git checkout -
# Set up Xvfb for the Firefox GUI.
- 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
# On 0.10, we want to test with the default version of npm, otherwise
# upgrade to the latest.
- if [[ ${TRAVIS_NODE_VERSION:0:1} -gt "0" ]]; then
npm install -g npm;
fi
install:
- npm install
before_script:
# Install Firefox Nightly to prevent signing errors.
- cd $TRAVIS_BUILD_DIR/../
- wget "https://download.mozilla.org/?product=firefox-nightly-latest&os=linux64&lang=en-US" -O firefox.tar.bz2 && tar xvf firefox.tar.bz2
- cd $TRAVIS_BUILD_DIR
script:
- export JPM_FIREFOX_BINARY=$TRAVIS_BUILD_DIR/../firefox/firefox-bin
- npm run-script jshint
- npm run-script jscs
- npm test
# Run changelog-lint but only on newer versions of Node (because of syntax errors)
- if [[ ${TRAVIS_NODE_VERSION:0:1} -ge "4" ]]; then
npm run changelog-lint;
fi
deploy:
provider: npm
email: [email protected]
skip_cleanup: true
# This is the API key for npm user 'addons-robot'
api_key:
secure: UKzB8YkSmxmYudL+hR1MdRWDmhPi8IOOwdKZSA7DsBhFzH+mxx7wV66K5R83ToQRufMJ9vFrYwmfMefKS4jRgf/FgbO0L+SaeWujGM2NUtjqN+dmmKEuck3vkKJHrY6VyEfz9HWJrpaUyNl8wmlDSayqc2eVPK63R9LmUcnYxbo=
on:
tags: true