瀏覽代碼

Revert "Another attempt at headless testing with Travis CI."

This reverts commits 2d0230dd4e1ae77a1d7dd8705fedf0f5f4c40156,
9e23ee0b5708bb96552d15571ec966f604a43301,
e996faa86c9dcc4c3e4a859cbb75567d4e3ace91,
and d204ac06d5.
pull/776/head
Matthew Petroff 5 年之前
父節點
當前提交
46c89c4155
共有 2 個文件被更改,包括 21 次插入14 次删除
  1. +3
    -9
      .travis.yml
  2. +18
    -5
      tests/run_tests.py

+ 3
- 9
.travis.yml 查看文件

@@ -1,19 +1,13 @@
language: generic
dist: xenial
services:
- xvfb
addons:
firefox: latest
sauce_connect: true
before_install:
- sudo apt-get install -y python3-pillow python3-numpy python3-pip mesa-utils libgl1-mesa-dri libglapi-mesa libosmesa6
- sudo apt-get install -y python3-pillow python3-numpy python3-pip
- sudo pip3 install selenium
install:
- wget https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux64.tar.gz
- tar -xf geckodriver-v0.24.0-linux64.tar.gz
- sudo mv geckodriver /usr/local/bin
jobs:
include:
- stage: build
script: python3 utils/build/build.py
- stage: test
script: xvfb-run -a python3 tests/run_tests.py
script: python3 tests/run_tests.py

+ 18
- 5
tests/run_tests.py 查看文件

@@ -33,11 +33,24 @@ thread.start()

# Create a new instance of the Firefox driver
print("Starting web driver...")
fp = webdriver.FirefoxProfile()
fp.set_preference("layout.css.devPixelsPerPx", "1.0")
fp.set_preference("devtools.console.stdout.content", True)
driver = webdriver.Firefox(firefox_profile=fp)
driver.set_window_size(800, 600)
if os.environ.get("TRAVIS_JOB_NUMBER"):
# Configuration for Travis CI / Sauce Labs testing
driver = webdriver.Remote(
command_executor="https://ondemand.saucelabs.com:443/wd/hub",
desired_capabilities={
"username": os.environ["SAUCE_USERNAME"],
"accessKey": os.environ["SAUCE_ACCESS_KEY"],
"tunnel-identifier": os.environ["TRAVIS_JOB_NUMBER"],
"build": os.environ["TRAVIS_JOB_NUMBER"],
"browserName": "firefox",
"seleniumVersion": "3.141.0",
},
)
else:
fp = webdriver.FirefoxProfile()
fp.set_preference("layout.css.devPixelsPerPx", "1.0")
driver = webdriver.Firefox(firefox_profile=fp)
driver.set_window_size(800, 600)


def run_tests():


Loading…
取消
儲存