forked from GMOD/jbrowse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
100 lines (100 loc) · 4.08 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
sudo: true
dist: trusty
language: perl
python: 2.7.10
perl:
- '5.26'
- '5.14'
addons:
apt:
packages:
- libdb-dev
- libgd2-noxpm-dev
firefox: '58.0'
cache:
directories:
- extlib/
- "$HOME/perl5/"
- node_modules/
- "$HOME/python/"
- "$HOME/.nvm/"
- "$HOME/geckodriver_$GECKODRIVER_VERSION"
- travis_phantomjs
before_install:
env:
global:
- GECKODRIVER_VERSION=0.19.1
- PHANTOMJS_VERSION=2.1.1
before_install:
- sudo dpkg --add-architecture i386
- sudo apt-get -qq update
- sudo apt-get install wine1.6
install:
- "export PATH=$PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64/bin:$PATH"
- "if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then rm -rf $PWD/travis_phantomjs; mkdir -p $PWD/travis_phantomjs; fi"
- "if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then wget https://github.com/Medium/phantomjs/releases/download/v$PHANTOMJS_VERSION/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -O $PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2; fi"
- "if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then tar -xvf $PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -C $PWD/travis_phantomjs; fi"
- "phantomjs --version"
- |
if [[ ! -f ~/geckodriver_$GECKODRIVER_VERSION/geckodriver ]]; then
rm -rf ~/geckodriver_$GECKODRIVER_VERSION;
mkdir ~/geckodriver_$GECKODRIVER_VERSION;
wget -O - https://github.com/mozilla/geckodriver/releases/download/v0.19.1/geckodriver-v$GECKODRIVER_VERSION-linux64.tar.gz | tar -xzf - -C ~/geckodriver_$GECKODRIVER_VERSION;
fi
- export PATH=$PATH:$HOME/geckodriver_$GECKODRIVER_VERSION
- cpanm --notest GD::Image Text::Markdown DateTime JSON
# only init the python virtualenv if it did not show up in our build cache
- if [[ ! -f ~/python/bin/activate ]]; then virtualenv ~/python; fi
- source ~/python/bin/activate
- pip install nose selenium
script:
# these versions *should* already be set in version control, but set them again here just in case
- if [[ "x$TRAVIS_TAG" != "x" ]]; then build/set_package_versions.pl $TRAVIS_TAG src/JBrowse/package.json package.json; fi
- RELEASE_VERSION=`node -e 'require("fs").readFile("src/JBrowse/package.json", (e,d)=>console.log(JSON.parse(d).version))'`
- BUILD_DIR=$PWD
- set -e
- ./setup.sh
- yarn lint
- prove -Isrc/perl5 -r -j3 tests/perl_tests;
- utils/jb_run.js -p 9000 & sleep 2
- node_modules/.bin/phantomjs tests/js_tests/run-jasmine.js http://localhost:9000/tests/js_tests/index.html
- xvfb-run node_modules/.bin/ava --timeout=60s tests/electron_tests
- MOZ_HEADLESS=1 SELENIUM_BROWSER=firefox JBROWSE_URL=http://localhost:9000/index.html tests/selenium_tests/travis_wrapper.sh;
# if we are building for inclusion into the `dev` branch, build the releases and test the minimal one too
- |
if [[ "x$TRAVIS_TAG" != "x" || $TRAVIS_BRANCH = "master" || $TRAVIS_BRANCH = "dev" || $TRAVIS_PULL_REQUEST != "false" ]]; then
make -f build/Makefile;
rm -rf JBrowse-*/;
unzip -q JBrowse-$RELEASE_VERSION.zip;
cd JBrowse-$RELEASE_VERSION/;
cp -r ../tests/ .;
./setup.sh;
prove -Isrc/perl5 -r -j3 tests/perl_tests;
cd $BUILD_DIR;
MOZ_HEADLESS=1 SELENIUM_BROWSER=firefox NOSEOPTS="-I jasmine" JBROWSE_URL=http://localhost:9000/JBrowse-$RELEASE_VERSION/index.html tests/selenium_tests/travis_wrapper.sh;
fi
- set +e
after_failure:
- cat setup.log
deploy:
# upload both minified and non-minified builds to GitHub releases
- provider: releases
api_key:
secure: BuOD7rqrcGKT3g0hVY5AGpJI/Kkko4DhSIYSUQ28sS2AOdoNyTD0t5doL/Kiq4BC41q198tbFFt1dnXGdo8YKpBSXO/uGUuuiGtMFHM++I84oLq20p49iyrenNZ4m/jy/Q4YtizIYLs83DVzVdQzhJ5hrTx6f+d1gc9EgaMeBF4=
file: JBrowse-1.*.zip
file_glob: true
skip_cleanup: true
on:
repo: GMOD/jbrowse
perl: 5.26
tags: true
# upload regular non-minified version to npm
- provider: npm
email: [email protected]
skip_cleanup: true
api_key:
secure: mgvlVdeMAR35C69+NERuYK4YGwbBAQsnSXS7IJhn3CRNgbtWh2zqaVV8NbHWitD9RJmocTbkIe94MfD8HfI3zBAgIVewckQ0QWMyjAJuWJR2Zw91R309aIQpbsix4kNCP9RDDrtfzovptBJ6JS8UwEk5CsQ7Wfohctek59+UnyU=
on:
repo: GMOD/jbrowse
perl: 5.26
tags: true