Update Travis CI to run GUI tests

This commit is contained in:
Micah Lee 2018-09-27 21:19:42 -07:00
parent 8261b4868d
commit 6f57f7eae6
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73
3 changed files with 10 additions and 6 deletions

View File

@ -1,6 +1,6 @@
language: python language: python
# sudo: required dist: trusty
dist: bionic sudo: required
python: python:
- "3.6" - "3.6"
- "3.6-dev" - "3.6-dev"
@ -8,14 +8,18 @@ python:
- "nightly" - "nightly"
# command to install dependencies # command to install dependencies
install: install:
- sudo apt-get update && sudo apt-get install python3-pyqt5
- pip install -r install/requirements.txt - pip install -r install/requirements.txt
- pip install -r install/requirements-tests.txt
- pip install pytest-cov coveralls flake8 - pip install pytest-cov coveralls flake8
before_script: before_script:
# stop the build if there are Python syntax errors or undefined names # stop the build if there are Python syntax errors or undefined names
- flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics - 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 # 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 - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# command to run tests # run CLI tests and local GUI tests
script: pytest --cov=onionshare tests/ script:
- pytest --cov=onionshare tests/
- cd tests_gui_local/ && xvfb-run ./run_unit_tests.sh
after_success: after_success:
- coveralls - coveralls

View File

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
for test in `ls -1 | egrep ^onionshare_`; do for test in `ls -1 | egrep ^onionshare_`; do
py.test-3 $test -vvv || exit 1 pytest $test -vvv || exit 1
done done

View File

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
for test in `ls -1 | egrep ^onionshare_`; do for test in `ls -1 | egrep ^onionshare_`; do
py.test-3 $test -vvv || exit 1 pytest $test -vvv || exit 1
done done