forked from scrapinghub/portia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
62 lines (59 loc) · 1.52 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
language: python
python: 3.5
sudo: required
dist: xenial
env:
- WHEELHOUSE=$HOME/.cache/wheelhouse PIP_FIND_LINKS=file://$WHEELHOUSE PIP_WHEEL_DIR=$WHEELHOUSE
cache:
directories:
- "$HOME/.cache/pip"
- "$HOME/.cache/wheelhouse"
- portiaui/node_modules
- portiaui/bower_components
install:
- source ${VIRTUAL_ENV}/bin/activate
- cd docker
- sudo -H ./provision.sh install_splash
- cd ..
- sudo -H pip install tox
- python3.5 -c 'import splash, qt5reactor' # Check it's in the python path
- cd portiaui
- nvm install 6.10.0
- nvm use 6.10.0
- npm install -g bower
- npm install
- bower install
- cd ..
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- source ${VIRTUAL_ENV}/bin/activate
- export PYTHONPATH=`pwd`/slybot:`pwd`/slyd
- cd slyd
- python2.7 tests/testserver/server.py 2>&1 | grep -v 'HTTP/1.1" 200' &
- cd ..
- sleep 3 # give xvfb some time to start
script:
- cd ./slybot
- sudo -E tox
- cd ../portia_server
- ./manage.py test portia_orm.tests
- ./manage.py test portia_api.tests
- cd ../portiaui
- npm rebuild node-sass
- npm test
before_deploy:
- cd ../slybot
- pip install twine
- sudo chown -R $USER .
deploy:
provider: pypi
distributions: sdist bdist_wheel
user: scrapinghub
password:
secure: S5hZT2YBncUSkPTyR5RUQnACfTsW2ZtpHeQucIamKWN+xkE8KK9O0cWUMuKQ0q3U5ShFkZdhO4PnBjvtP54Dq9IogJAudkDJCylctf4qGoIlWu01mAoJzcUfrS5KW+VolF/opBJObwG38EIOOsVy9UYq7DeQcryAAG1RuMjONAk=
on:
all_branches: true
tags: true
repo: scrapinghub/portia
condition: "$TRAVIS_TAG =~ ^slybot-[0-9][.][0-9]*"