-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
64 lines (60 loc) · 2.23 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
language: python
python:
- "2.7"
dist: xenial
sudo: required
addons:
chrome: stable
apt:
update: true
env:
global:
#- BASE_DIR=/home/travis/palletone/go-palletone/explorer_test/PalletoneExplorer/
- IS_UPLOAD=true
- PIP_PACKAGE_PATH=/usr/lib/python2.7/dist-packages
- REPORT_PATH=/home/travis/build/palletone/explorer_test/PalletoneExplorer
before_install:
- export PYTHONPATH=/home/travis/build/palletone/explorer_test/PalletoneExplorer:/usr/lib/python2.7/:/usr/lib/python2.7/plat-x86_64-linux-gnu/:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload:/usr/local/lib/python2.7/:/usr/local/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages
- ls -l ${PIP_PACKAGE_PATH}
- sudo -H pip install --upgrade pip
- sudo -H pip install --target=${PIP_PACKAGE_PATH} selenium==3.14.1
#- python -m pip install -U selenium
- sudo -H pip install --target=${PIP_PACKAGE_PATH} unittest2
- sudo -H pip install --target=${PIP_PACKAGE_PATH} requests
- sudo -H apt-get -qq install xvfb
#chromium-browser
- wget http://chromedriver.storage.googleapis.com/75.0.3770.8/chromedriver_linux64.zip
- sudo -H apt-get install unzip
- sudo -H unzip chromedriver_linux64.zip
- pwd
- sudo -H chmod a+x chromedriver
- sudo mv chromedriver /usr/local/bin/
- ls -l /usr/local/bin/chromedriver
#- export CHROME_HOME=chromium-browser
- Xvfb -ac :7 -screen 0 1366x768x8 &
#- export DISPLAY=:7
- sleep 3
install:
- sudo -H apt-get install expect lftp
- chmod +x PalletoneExplorer/upload2Ftp.sh
script:
- echo $PYTHONPATH
- ls -l /usr/local/lib/python2.7/dist-packages
- sudo -H find / -name "*sysconfigdata_nd.py"
- sudo ln -s /usr/lib/python2.7/plat-x86_64-linux-gnu/_sysconfigdata_nd.py /usr/lib/python2.7/
- ls -l ${PIP_PACKAGE_PATH}
- mkdir -p PalletoneExplorer/Report
- cd PalletoneExplorer
- python print_syspath.py
- python more/viewSettings/viewSettings.py
#env:
#- BROWSER="Chrome"
#- BROWSER="Firefox"
after_script:
#- sudo -H mv /PalletoneExplorer/Report/TestResult*.html /PalletoneExplorer/Report/TestResult.html
- zip -j ./Report/TestResult.zip ./Report/*
- sudo rm /Report/*.html
- |
if [ $IS_UPLOAD == 'true' ]; then
./upload2Ftp.sh ${FTP_PWD} bdd;
fi