From a72d315ae808cb1dbda7db25930c68c3383a2044 Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Thu, 27 Sep 2018 21:19:42 -0700 Subject: [PATCH] Update Travis CI to run GUI tests --- .travis.yml | 12 ++++++++---- tests_gui_local/run_unit_tests.sh | 2 +- tests_gui_tor/run_unit_tests.sh | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index a41339cc..aa1ff102 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: python -# sudo: required -dist: bionic +dist: trusty +sudo: required python: - "3.6" - "3.6-dev" @@ -8,14 +8,18 @@ python: - "nightly" # command to install dependencies install: + - sudo apt-get update && sudo apt-get install python3-pyqt5 - pip install -r install/requirements.txt + - pip install -r install/requirements-tests.txt - pip install pytest-cov coveralls flake8 before_script: # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics -# command to run tests -script: pytest --cov=onionshare tests/ +# run CLI tests and local GUI tests +script: + - pytest --cov=onionshare tests/ + - cd tests_gui_local/ && xvfb-run ./run_unit_tests.sh after_success: - coveralls diff --git a/tests_gui_local/run_unit_tests.sh b/tests_gui_local/run_unit_tests.sh index d15f8a6e..7d207a57 100755 --- a/tests_gui_local/run_unit_tests.sh +++ b/tests_gui_local/run_unit_tests.sh @@ -1,5 +1,5 @@ #!/bin/bash for test in `ls -1 | egrep ^onionshare_`; do - py.test-3 $test -vvv || exit 1 + pytest $test -vvv || exit 1 done diff --git a/tests_gui_tor/run_unit_tests.sh b/tests_gui_tor/run_unit_tests.sh index d15f8a6e..7d207a57 100755 --- a/tests_gui_tor/run_unit_tests.sh +++ b/tests_gui_tor/run_unit_tests.sh @@ -1,5 +1,5 @@ #!/bin/bash for test in `ls -1 | egrep ^onionshare_`; do - py.test-3 $test -vvv || exit 1 + pytest $test -vvv || exit 1 done