SeleniumBase/.travis.yml

43 lines
2.2 KiB
YAML
Raw Normal View History

2017-10-07 07:36:47 +08:00
language: python
2017-10-08 12:21:14 +08:00
sudo: false
2019-09-11 03:58:32 +08:00
dist: xenial
2018-12-27 07:38:43 +08:00
matrix:
include:
- python: 2.7
2018-12-27 07:45:48 +08:00
- python: 3.6
2017-10-08 08:28:21 +08:00
addons:
2018-12-27 07:25:59 +08:00
firefox: "62.0.3"
2019-09-11 03:58:32 +08:00
chrome: stable
2018-04-11 13:20:20 +08:00
before_install:
2019-08-09 16:49:41 +08:00
- "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"
2018-04-12 09:36:51 +08:00
- "mysqladmin -u root password test"
# - "mysqladmin -u root -p'old_password' password new_password"
2019-08-09 16:49:41 +08:00
- "sudo service mysql restart"
2015-12-06 09:34:59 +08:00
install:
2018-05-08 00:20:41 +08:00
- "pip install --upgrade pip"
2018-03-04 21:39:58 +08:00
- "pip install -r requirements.txt --upgrade"
- "python setup.py develop"
2017-10-08 12:28:57 +08:00
- "sudo rm -f /etc/boto.cfg"
2015-12-06 09:27:34 +08:00
before_script:
- "flake8 --exclude=temp"
2019-08-18 04:53:24 +08:00
# - "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"
2018-12-14 17:12:31 +08:00
- "seleniumbase"
2018-08-01 02:57:22 +08:00
- "seleniumbase install chromedriver"
- "seleniumbase install geckodriver"
2018-08-08 10:25:04 +08:00
- "seleniumbase mkdir browser_tests"
2016-06-12 00:48:02 +08:00
script:
2018-08-08 10:25:04 +08:00
- "pytest browser_tests/boilerplates/boilerplate_test.py --headless --with-db_reporting"
2018-04-17 15:19:25 +08:00
- "pytest examples/my_first_test.py --browser=chrome -s --headless --with-db_reporting"
- "nosetests examples/boilerplates/boilerplate_test.py --browser=chrome --headless"
2018-04-13 13:35:00 +08:00
- "pytest examples/my_first_test.py --browser=firefox -s --headless --with-db_reporting"
2018-06-13 03:47:22 +08:00
- "pytest examples/my_first_test.py --browser=chrome -s --headless --with-db_reporting --demo_mode --demo_sleep=0.2"
2018-06-18 11:47:22 +08:00
- "pytest examples/tour_examples/google_tour.py -s --headless --with-db_reporting"
2019-08-09 16:49:41 +08:00
- "sudo mysql --password=test -e 'select test_address,browser,state,start_time,runtime from test_db.test_run_data'"
2018-08-11 02:48:55 +08:00
#after_script:
# - "sudo mysql -e 'DROP DATABASE test_db;'"
notifications:
email: false