forked from webcompat/webcompat.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
62 lines (50 loc) · 1.86 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
50
51
52
53
54
55
56
57
58
59
60
61
62
# use container-based environment
sudo: false
language: python
python:
- "2.7"
# cache pip and npm package installations
cache:
pip: true
directories:
- node_modules
- $HOME/.selenium/
# limit the depth of the commits we clone
git:
depth: 5
addons:
firefox: "47.0.1"
env:
global:
- ISSUES_REPO_URI=webcompat/webcompat-tests/issues
- FAKE_ID=e80a666fbf1fa9ea18db
- FAKE_SECRET=688c4546f09624f8c44773b22268064dfca19a59
# grab latest 4.x release, which is LTS for now
- TRAVIS_NODE_VERSION="4"
before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- "mkdir -p $HOME/.selenium && cd $HOME/.selenium && wget -nc http://selenium-release.storage.googleapis.com/2.53/selenium-server-standalone-2.53.1.jar"
- java -jar selenium-server-standalone-2.53.1.jar &> /dev/null &
- cd -
install:
- rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION
- travis_retry npm install -g grunt-cli
- travis_retry npm install
- travis_retry npm run pip
- travis_retry npm run config
# lint python
- pep8 --ignore=E402 webcompat/ tests/ config/secrets.py.example
- npm run module
- python run.py -t &
before_script:
- "sleep 2"
# lint JS in default eslint task
- npm run build
# now run the tests!
# if this is a pull request from a fork, TRAVIS_SECURE_ENV_VARS will be false, so
# just run the non-auth tests. otherwise, run everything.
script:
- nosetests
- if [ "$TRAVIS_SECURE_ENV_VARS" == "false" ] ; then node_modules/.bin/intern-runner reporters=console config=tests/intern functionalSuites=tests/functional-nonauth ; fi
- if [ "$TRAVIS_SECURE_ENV_VARS" == "true" ] ; then node_modules/.bin/intern-runner reporters=console config=tests/intern user="$USER" pw="$PW" ; fi