From 6d6e8b6a8fceefa2a114408a621b34972c439440 Mon Sep 17 00:00:00 2001 From: SP Mohanty <spmohanty91@gmail.com> Date: Wed, 22 May 2019 14:36:34 +0200 Subject: [PATCH] Use xvfb-run only for CI --- .gitlab-ci.yml | 4 ++-- Makefile | 2 +- tox.ini | 7 +++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a7f07218..81372257 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,7 +26,7 @@ tests: - apt install -y libgl1-mesa-glx xvfb - pip install tox - apt install -y graphviz xdg-utils - - xvfb-run -s "-screen 0 800x600x24" tox + - xvfb-run tox -v --recreate build_and_deploy_docs: image: "python:latest" @@ -42,7 +42,7 @@ build_and_deploy_docs: script: - pip install -r requirements_dev.txt - python setup.py install - - make docs + - xvfb-run make docs - aws s3 cp ./docs/_build/html/ s3://${BUCKET_NAME} --recursive environment: name: ${CI_COMMIT_REF_SLUG} diff --git a/Makefile b/Makefile index 5a4d36e9..98dcbb47 100644 --- a/Makefile +++ b/Makefile @@ -61,7 +61,7 @@ test-all: ## run tests on every Python version with tox tox coverage: ## check code coverage quickly with the default Python - xvfb-run -a coverage run --source flatland -m pytest + coverage run --source flatland -m pytest coverage report -m coverage html $(BROWSER) htmlcov/index.html diff --git a/tox.ini b/tox.ini index 4746c0e8..20dda814 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py36, py37, flake8, docs, coverage, benchmark, xvfb-run, sh +envlist = py36, py37, flake8, docs, coverage, benchmark, sh [travis] python = @@ -37,8 +37,7 @@ commands = sh -c 'ls benchmarks/*.py | xargs -n 1 python' [testenv] -whitelist_externals = xvfb-run - sh +whitelist_externals = sh pip setenv = PYTHONPATH = {toxinidir} @@ -51,6 +50,6 @@ commands = pip install -U pip pip install -r requirements_dev.txt sh -c 'echo DISPLAY: $DISPLAY' - xvfb-run -a py.test --basetemp={envtmpdir} + py.test --basetemp={envtmpdir} -- GitLab