Skip to content

Commit

Permalink
Install libs before running tests on qt
Browse files Browse the repository at this point in the history
  • Loading branch information
don4get committed Jan 15, 2020
1 parent 9cb719e commit 502e93e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 15 deletions.
25 changes: 20 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,41 @@
dist: xenial
dist: bionic
language: python
branches:
only:
- master

sudo: required

before_install:
- sudo apt-get update
- sudo apt-get install -y xvfb herbstluftwm

install:
- "export DISPLAY=:99.0"
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1920x1200x24 -ac +extension GLX +render -noreset"
- sleep 3
- pip install tox

matrix:
include:
- python: 3.8
env: TOXENV=flake8
- python: 3.8
env: TOXENV=black
- python: 3.8
env: TOXENV=mypy
- python: 3.6
env: TOXENV=py36
- python: 3.7
env: TOXENV=py37
- python: 3.8
env: TOXENV=py38
- python: 3.6
env: TOXENV=codecov
- python: 3.6
env: TOXENV=check_packaging

install:
- pip install tox
before_script:
- "herbstluftwm &"
- sleep 1

script:
- tox
1 change: 1 addition & 0 deletions requirements_tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ pre-commit
pytest
pytest-cov
pytest-qt
pytest-xvfb
tox
13 changes: 3 additions & 10 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,25 @@
envlist = py36, py37, py38, black, packaging, codecov

[default]

basepython = python3.8

[testenv]
passenv = DISPLAY XAUTHORITY
setenv =
PYTHONPATH = {toxinidir}

commands = pytest --cov-append --cov=nodedge tests/
commands = pytest -s -vv --cov-append --cov=nodedge
deps =
-rrequirements.txt
-rrequirements_tests.txt

[testenv:black]

description = run Black (linter)
basepython = {[default]basepython}
skip_install = True

commands =
black {env:BLACK_LINT_ARGS:} nodedge

[testenv:flake8]

description = run Flake8 (linter)
basepython = {[default]basepython}
skip_install = True
Expand All @@ -38,14 +34,11 @@ max-line-length = 89
max-complexity = 18
select = B,C,E,F,W,T4,B9

[testenv:packaging]
[testenv:check_packaging]

description = check for potential packaging problems

basepython = {[default]basepython}

skip_install = True

deps =
check-manifest==0.40
readme_renderer==24.0
Expand Down

0 comments on commit 502e93e

Please sign in to comment.