forked from seleniumbase/SeleniumBase
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
44 lines (44 loc) · 2.37 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
language: python
sudo: false
dist: xenial
matrix:
include:
- python: 2.7
- python: 3.6
addons:
firefox: "62.0.3"
chrome: stable
before_install:
- "sudo service mysql start"
- "sudo mysql -e 'CREATE DATABASE IF NOT EXISTS test_db;'"
- "sudo mysql -h 127.0.0.1 -u root test_db < seleniumbase/core/create_db_tables.sql"
- "mysqladmin -u root password test"
# - "mysqladmin -u root -p'old_password' password new_password"
- "sudo service mysql restart"
install:
- "pip install --upgrade pip"
- "pip install -r requirements.txt --upgrade"
- "python setup.py install"
- "sudo rm -f /etc/boto.cfg"
before_script:
- "flake8 --exclude=temp"
# - "wget https://chromedriver.storage.googleapis.com/2.44/chromedriver_linux64.zip && unzip chromedriver_linux64.zip && sudo cp chromedriver /usr/local/bin/ && sudo chmod +x /usr/local/bin/chromedriver"
# - "wget https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux64.tar.gz -O /tmp/geckodriver.tar.gz && tar -C /opt -xzf /tmp/geckodriver.tar.gz && sudo chmod 755 /opt/geckodriver && sudo ln -fs /opt/geckodriver /usr/bin/geckodriver && sudo ln -fs /opt/geckodriver /usr/local/bin/geckodriver"
# - "wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 && tar -xvf ./phantomjs-2.1.1-linux-x86_64.tar.bz2 && export PATH=$PWD/phantomjs-2.1.1-linux-x86_64/bin:$PATH"
- "seleniumbase"
- "seleniumbase install chromedriver"
- "seleniumbase install geckodriver"
- "seleniumbase mkdir browser_tests"
script:
- "pytest browser_tests/boilerplates/boilerplate_test.py --headless --with-db_reporting"
- "pytest examples/my_first_test.py --browser=chrome -s --headless --with-db_reporting"
- "nosetests examples/boilerplates/boilerplate_test.py --browser=chrome --headless"
- "pytest examples/my_first_test.py --browser=firefox -s --headless --with-db_reporting"
- "pytest examples/my_first_test.py --browser=chrome -s --headless --with-db_reporting --demo_mode --demo_sleep=0.2"
- "pytest examples/test_inspect_html.py --browser=chrome -s --headless --with-db_reporting"
- "pytest examples/tour_examples/google_tour.py -s --headless --with-db_reporting"
- "sudo mysql --password=test -e 'select test_address,browser,state,start_time,runtime from test_db.test_run_data'"
#after_script:
# - "sudo mysql -e 'DROP DATABASE test_db;'"
notifications:
email: false