From 02cd86fc69acaba1e642e68f266f3cb308ce4c08 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Fri, 5 Oct 2018 10:40:39 +0200 Subject: [PATCH 01/31] Split long docker commands This way travis gives a better indication which command failed. Also it makes the lines shorter and easier to read. --- .travis.yml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index fe6575f2..6ed04af3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,9 +11,19 @@ before_install: - docker run --rm -d --name vdebug-distro-test -v $(pwd):/travis $DISTRO tail -f /dev/null - docker ps install: - - |- - docker exec -t vdebug-distro-test bash -c "apt-get update && apt-get install -y sudo vim-gtk3 xvfb python3 python3-pip ruby-dev gcc make automake libtool php-cli php-xdebug locales && gem install bundler && pip3 install coverage && echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && locale-gen && echo 'LANG=en_US.UTF-8' > /etc/default/locale && useradd -u $(id -u) -M -s /bin/bash -d /travis travis && echo '%travis ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/travis" - - docker exec -t vdebug-distro-test su - travis -c "bundle install" + - docker exec -t vdebug-distro-test apt-get update + - docker exec -t vdebug-distro-test apt-get install -y sudo vim-gtk3 xvfb python3 python3-pip ruby-dev gcc make automake libtool php-cli php-xdebug locales + - docker exec -t vdebug-distro-test gem install bundler + - docker exec -t vdebug-distro-test pip3 install coverage + - docker exec -t vdebug-distro-test bash -c 'echo en_US.UTF-8 UTF-8 >> /etc/locale.gen' + - docker exec -t vdebug-distro-test locale-gen + - docker exec -t vdebug-distro-test bash -c 'echo LANG=en_US.UTF-8 > /etc/default/locale' + - docker exec -t vdebug-distro-test useradd -u $(id -u) -M -s /bin/bash -d /travis travis + # The colon makes yaml think this is a dict so we have to quote the whole + # thing. + - "docker exec -t vdebug-distro-test bash -c 'echo \"%travis ALL=(ALL) NOPASSWD: ALL\" > /etc/sudoers.d/travis'" + - docker exec -t vdebug-distro-test su - travis -c 'bundle install' script: - - docker exec -t vdebug-distro-test su - travis -c "coverage run -m unittest discover && coverage report -m --include='python3/vdebug/*'" - - docker exec -t vdebug-distro-test su - travis -c "xvfb-run bundle exec rake spec features" + - docker exec -t vdebug-distro-test su - travis -c 'coverage run -m unittest discover' + - docker exec -t vdebug-distro-test su - travis -c 'coverage report -m --include="python3/vdebug/*"' + - docker exec -t vdebug-distro-test su - travis -c 'xvfb-run bundle exec rake spec features' From 2f2b6a94dc05363c4504c866c9b901fccdc9179c Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Fri, 5 Oct 2018 14:18:47 +0200 Subject: [PATCH 02/31] Remove travis gem from requirements The gem is used to interact with travis.ci which is not strictly necessary to test vdebug (even if the tests run on travis). This also makes some dependencies obsolete as they where only needed for the travis gem. --- .travis.yml | 2 +- Gemfile | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6ed04af3..008fdf23 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ before_install: - docker ps install: - docker exec -t vdebug-distro-test apt-get update - - docker exec -t vdebug-distro-test apt-get install -y sudo vim-gtk3 xvfb python3 python3-pip ruby-dev gcc make automake libtool php-cli php-xdebug locales + - docker exec -t vdebug-distro-test apt-get install -y sudo vim-gtk3 xvfb python3 python3-pip php-cli php-xdebug locales - docker exec -t vdebug-distro-test gem install bundler - docker exec -t vdebug-distro-test pip3 install coverage - docker exec -t vdebug-distro-test bash -c 'echo en_US.UTF-8 UTF-8 >> /etc/locale.gen' diff --git a/Gemfile b/Gemfile index dbcbb584..bc67b59a 100644 --- a/Gemfile +++ b/Gemfile @@ -4,4 +4,3 @@ gem 'rake', '~> 10.0.4' gem 'rspec', '~> 2.13.0' gem 'vimrunner', '~> 0.3.0' gem 'cucumber' -gem 'travis' From 8ea61e7fb45b04adf7f10abee3a2646a7b377c91 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Fri, 5 Oct 2018 13:39:23 +0200 Subject: [PATCH 03/31] Install bundler and coverage with apt --- .travis.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 008fdf23..f3518af3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,9 +12,11 @@ before_install: - docker ps install: - docker exec -t vdebug-distro-test apt-get update - - docker exec -t vdebug-distro-test apt-get install -y sudo vim-gtk3 xvfb python3 python3-pip php-cli php-xdebug locales - - docker exec -t vdebug-distro-test gem install bundler - - docker exec -t vdebug-distro-test pip3 install coverage + # Vim, php, xdebug, bundler and coverage are needed to run the tests. + # Xvfb is needed to use the server feature of vim without a running X + # server (which is needed for some tests). The locales and sudo packages + # are used to set things up inside the container. + - docker exec -t vdebug-distro-test apt-get install -y vim-gtk3 php-cli php-xdebug bundler python3-coverage xvfb locales sudo - docker exec -t vdebug-distro-test bash -c 'echo en_US.UTF-8 UTF-8 >> /etc/locale.gen' - docker exec -t vdebug-distro-test locale-gen - docker exec -t vdebug-distro-test bash -c 'echo LANG=en_US.UTF-8 > /etc/default/locale' @@ -24,6 +26,6 @@ install: - "docker exec -t vdebug-distro-test bash -c 'echo \"%travis ALL=(ALL) NOPASSWD: ALL\" > /etc/sudoers.d/travis'" - docker exec -t vdebug-distro-test su - travis -c 'bundle install' script: - - docker exec -t vdebug-distro-test su - travis -c 'coverage run -m unittest discover' - - docker exec -t vdebug-distro-test su - travis -c 'coverage report -m --include="python3/vdebug/*"' + - docker exec -t vdebug-distro-test su - travis -c 'python3-coverage run -m unittest discover' + - docker exec -t vdebug-distro-test su - travis -c 'python3-coverage report -m --include="python3/vdebug/*"' - docker exec -t vdebug-distro-test su - travis -c 'xvfb-run bundle exec rake spec features' From 2abe482e3faac57daf619bec30a794788096e021 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Sat, 6 Oct 2018 12:53:52 +0200 Subject: [PATCH 04/31] Local bundler install This makes sudo and the setup of sudo unnecessary. --- .travis.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index f3518af3..c1e97118 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,17 +14,14 @@ install: - docker exec -t vdebug-distro-test apt-get update # Vim, php, xdebug, bundler and coverage are needed to run the tests. # Xvfb is needed to use the server feature of vim without a running X - # server (which is needed for some tests). The locales and sudo packages - # are used to set things up inside the container. - - docker exec -t vdebug-distro-test apt-get install -y vim-gtk3 php-cli php-xdebug bundler python3-coverage xvfb locales sudo + # server (which is needed for some tests). The locales package is used to + # set things up inside the container. + - docker exec -t vdebug-distro-test apt-get install -y vim-gtk3 php-cli php-xdebug bundler python3-coverage xvfb locales - docker exec -t vdebug-distro-test bash -c 'echo en_US.UTF-8 UTF-8 >> /etc/locale.gen' - docker exec -t vdebug-distro-test locale-gen - docker exec -t vdebug-distro-test bash -c 'echo LANG=en_US.UTF-8 > /etc/default/locale' - docker exec -t vdebug-distro-test useradd -u $(id -u) -M -s /bin/bash -d /travis travis - # The colon makes yaml think this is a dict so we have to quote the whole - # thing. - - "docker exec -t vdebug-distro-test bash -c 'echo \"%travis ALL=(ALL) NOPASSWD: ALL\" > /etc/sudoers.d/travis'" - - docker exec -t vdebug-distro-test su - travis -c 'bundle install' + - docker exec -t vdebug-distro-test su - travis -c 'bundle install --path vendor/bundle' script: - docker exec -t vdebug-distro-test su - travis -c 'python3-coverage run -m unittest discover' - docker exec -t vdebug-distro-test su - travis -c 'python3-coverage report -m --include="python3/vdebug/*"' From 10d5a5c841a91de49b1dd24dcf3885db93f6d9ed Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Sat, 6 Oct 2018 13:05:25 +0200 Subject: [PATCH 05/31] Do not allocate a tty for docker commands Apt needs a special environment variable to work but the other commands do not need a tty. --- .travis.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index c1e97118..c8f6a878 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,18 +11,18 @@ before_install: - docker run --rm -d --name vdebug-distro-test -v $(pwd):/travis $DISTRO tail -f /dev/null - docker ps install: - - docker exec -t vdebug-distro-test apt-get update + - docker exec --env=DEBIAN_FRONTEND=noninteractive vdebug-distro-test apt-get update # Vim, php, xdebug, bundler and coverage are needed to run the tests. # Xvfb is needed to use the server feature of vim without a running X # server (which is needed for some tests). The locales package is used to # set things up inside the container. - - docker exec -t vdebug-distro-test apt-get install -y vim-gtk3 php-cli php-xdebug bundler python3-coverage xvfb locales - - docker exec -t vdebug-distro-test bash -c 'echo en_US.UTF-8 UTF-8 >> /etc/locale.gen' - - docker exec -t vdebug-distro-test locale-gen - - docker exec -t vdebug-distro-test bash -c 'echo LANG=en_US.UTF-8 > /etc/default/locale' - - docker exec -t vdebug-distro-test useradd -u $(id -u) -M -s /bin/bash -d /travis travis - - docker exec -t vdebug-distro-test su - travis -c 'bundle install --path vendor/bundle' + - docker exec --env=DEBIAN_FRONTEND=noninteractive vdebug-distro-test apt-get install -y vim-gtk3 php-cli php-xdebug bundler python3-coverage xvfb locales + - docker exec vdebug-distro-test bash -c 'echo en_US.UTF-8 UTF-8 >> /etc/locale.gen' + - docker exec vdebug-distro-test locale-gen + - docker exec vdebug-distro-test bash -c 'echo LANG=en_US.UTF-8 > /etc/default/locale' + - docker exec vdebug-distro-test useradd -u $(id -u) -M -s /bin/bash -d /travis travis + - docker exec vdebug-distro-test su - travis -c 'bundle install --path vendor/bundle' script: - - docker exec -t vdebug-distro-test su - travis -c 'python3-coverage run -m unittest discover' - - docker exec -t vdebug-distro-test su - travis -c 'python3-coverage report -m --include="python3/vdebug/*"' - - docker exec -t vdebug-distro-test su - travis -c 'xvfb-run bundle exec rake spec features' + - docker exec vdebug-distro-test su - travis -c 'python3-coverage run -m unittest discover' + - docker exec vdebug-distro-test su - travis -c 'python3-coverage report -m --include="python3/vdebug/*"' + - docker exec vdebug-distro-test su - travis -c 'xvfb-run bundle exec rake spec features' From 808cbb2ae47ca28c2c69299b1e49e7d7a4f6039a Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Sat, 6 Oct 2018 13:23:06 +0200 Subject: [PATCH 06/31] Separate flaky tests from other tests The ruby specs in spec/startup_spec.rb fail randomly on travis so we execute the specs separated from the feature tests. That way rake will not stop after the failure. --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c8f6a878..daa65b63 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,4 +25,7 @@ install: script: - docker exec vdebug-distro-test su - travis -c 'python3-coverage run -m unittest discover' - docker exec vdebug-distro-test su - travis -c 'python3-coverage report -m --include="python3/vdebug/*"' - - docker exec vdebug-distro-test su - travis -c 'xvfb-run bundle exec rake spec features' + - docker exec vdebug-distro-test su - travis -c 'xvfb-run bundle exec rake features' + # The spec/startup_spec.rb test fails randomly on travis so we execute it + # last so all other tests will run first. + - docker exec vdebug-distro-test su - travis -c 'xvfb-run bundle exec rake spec' From 390597843b9cf7dd6d9b03682ee5c4e2cc6bd2e8 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Sat, 6 Oct 2018 13:44:48 +0200 Subject: [PATCH 07/31] Clean up locale setup and usage The package installation with bundler does not require a full login session from su so it can be run with sh. --- .travis.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index daa65b63..da3db9be 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,12 +17,19 @@ install: # server (which is needed for some tests). The locales package is used to # set things up inside the container. - docker exec --env=DEBIAN_FRONTEND=noninteractive vdebug-distro-test apt-get install -y vim-gtk3 php-cli php-xdebug bundler python3-coverage xvfb locales - - docker exec vdebug-distro-test bash -c 'echo en_US.UTF-8 UTF-8 >> /etc/locale.gen' + # By default the locale inside the container is latin1. For consistent + # tests we want to use utf8. + - docker exec vdebug-distro-test sh -c 'echo en_US.UTF-8 UTF-8 >> /etc/locale.gen' + - docker exec vdebug-distro-test sh -c 'echo LANG=en_US.UTF-8 > /etc/default/locale' - docker exec vdebug-distro-test locale-gen - - docker exec vdebug-distro-test bash -c 'echo LANG=en_US.UTF-8 > /etc/default/locale' - docker exec vdebug-distro-test useradd -u $(id -u) -M -s /bin/bash -d /travis travis - - docker exec vdebug-distro-test su - travis -c 'bundle install --path vendor/bundle' + # We are currently on docker 17.09 and the --workdir option for exec was + # only introduced in 17.12. Therefore we have to use the shell with cd. + - docker exec -u travis vdebug-distro-test sh -c 'cd /travis && bundle install --path vendor/bundle' script: + # The tests have to be run with su(1) to get the right value for $LANG. + # If docker is used to switch the user and just run sh(1) the locale setup + # from above is not picked up. - docker exec vdebug-distro-test su - travis -c 'python3-coverage run -m unittest discover' - docker exec vdebug-distro-test su - travis -c 'python3-coverage report -m --include="python3/vdebug/*"' - docker exec vdebug-distro-test su - travis -c 'xvfb-run bundle exec rake features' From 74b2387af78f2e50e6003eb796e51a0e85b98f1e Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Sat, 6 Oct 2018 21:55:58 +0200 Subject: [PATCH 08/31] Fix startup of xvfb if display is not free --- .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index da3db9be..606530c2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,5 +34,7 @@ script: - docker exec vdebug-distro-test su - travis -c 'python3-coverage report -m --include="python3/vdebug/*"' - docker exec vdebug-distro-test su - travis -c 'xvfb-run bundle exec rake features' # The spec/startup_spec.rb test fails randomly on travis so we execute it - # last so all other tests will run first. - - docker exec vdebug-distro-test su - travis -c 'xvfb-run bundle exec rake spec' + # last so all other tests will run first. It seems that some of the + # failures result from the xvfb from above no releasing the display fast + # enough: https://stackoverflow.com/a/8880717 + - docker exec vdebug-distro-test su - travis -c 'xvfb-run --auto-servernum bundle exec rake spec' From 86eeb7df72937ae0242dcaa708c15be486aed2d1 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Fri, 30 Nov 2018 08:48:32 +0100 Subject: [PATCH 09/31] Run on bare ubuntu instead of docker and add job for osx --- .travis.yml | 76 +++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 56 insertions(+), 20 deletions(-) diff --git a/.travis.yml b/.travis.yml index 606530c2..7ee1fc4a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,39 +2,75 @@ notifications: irc: irc.freenode.org#vdebug slack: secure: BksygPSsoRfvre27w6XQN9ooKB9C1n83Bw96YurvyDHJ6BYM2Gv9fW1Sj6NHpB8MQkMaJ+9gRiBSflkP+l80t3EXAdStuI/8EM/wZu1ov6bmYT/hYQ8HnULmmPNj8uVzsX13VGEUC/YY4osWuJFM1wh61dStoF+SKrpslqWCV4w= + language: python -env: - matrix: - - DISTRO: 'ubuntu:16.04' - - DISTRO: 'debian:9' -before_install: - - docker run --rm -d --name vdebug-distro-test -v $(pwd):/travis $DISTRO tail -f /dev/null - - docker ps -install: - - docker exec --env=DEBIAN_FRONTEND=noninteractive vdebug-distro-test apt-get update +dist: xenial +matrix: + include: + - os: linux + env: + DOCKER: false + - os: linux + env: + DOCKER: true + DISTRO: debian:9 + - os: osx + env: + DOCKER: false + +before_install: | + set -e + if $DOCKER; then + docker run --rm -d --name vdebug-distro-test -v $(pwd):/travis $DISTRO tail -f /dev/null; fi + docker ps + fi +install: | + set -e + if $DOCKER; then + docker exec --env=DEBIAN_FRONTEND=noninteractive vdebug-distro-test apt-get update; elif # Vim, php, xdebug, bundler and coverage are needed to run the tests. # Xvfb is needed to use the server feature of vim without a running X # server (which is needed for some tests). The locales package is used to # set things up inside the container. - - docker exec --env=DEBIAN_FRONTEND=noninteractive vdebug-distro-test apt-get install -y vim-gtk3 php-cli php-xdebug bundler python3-coverage xvfb locales + docker exec --env=DEBIAN_FRONTEND=noninteractive vdebug-distro-test apt-get install -y vim-gtk3 php-cli php-xdebug bundler python3-coverage xvfb locales # By default the locale inside the container is latin1. For consistent # tests we want to use utf8. - - docker exec vdebug-distro-test sh -c 'echo en_US.UTF-8 UTF-8 >> /etc/locale.gen' - - docker exec vdebug-distro-test sh -c 'echo LANG=en_US.UTF-8 > /etc/default/locale' - - docker exec vdebug-distro-test locale-gen - - docker exec vdebug-distro-test useradd -u $(id -u) -M -s /bin/bash -d /travis travis + docker exec vdebug-distro-test sh -c 'echo en_US.UTF-8 UTF-8 >> /etc/locale.gen' + docker exec vdebug-distro-test sh -c 'echo LANG=en_US.UTF-8 > /etc/default/locale' + docker exec vdebug-distro-test locale-gen + docker exec vdebug-distro-test useradd -u $(id -u) -M -s /bin/bash -d /travis travis # We are currently on docker 17.09 and the --workdir option for exec was # only introduced in 17.12. Therefore we have to use the shell with cd. - - docker exec -u travis vdebug-distro-test sh -c 'cd /travis && bundle install --path vendor/bundle' -script: + docker exec -u travis vdebug-distro-test sh -c 'cd /travis && bundle install --path vendor/bundle' + elif [[ $TRAVIS_OS_NAME = linux ]]; then + apt-get update + apt-get install -y vim-gtk3 php-cli php-xdebug bundler python3-coverage xvfb locales + bundle install --path vendor/bundle + else + brew update + fi +script: | + set -e + if $DOCKER; then # The tests have to be run with su(1) to get the right value for $LANG. # If docker is used to switch the user and just run sh(1) the locale setup # from above is not picked up. - - docker exec vdebug-distro-test su - travis -c 'python3-coverage run -m unittest discover' - - docker exec vdebug-distro-test su - travis -c 'python3-coverage report -m --include="python3/vdebug/*"' - - docker exec vdebug-distro-test su - travis -c 'xvfb-run bundle exec rake features' + docker exec vdebug-distro-test su - travis -c 'python3-coverage run -m unittest discover' + docker exec vdebug-distro-test su - travis -c 'python3-coverage report -m --include="python3/vdebug/*"' + docker exec vdebug-distro-test su - travis -c 'xvfb-run bundle exec rake features' # The spec/startup_spec.rb test fails randomly on travis so we execute it # last so all other tests will run first. It seems that some of the # failures result from the xvfb from above no releasing the display fast # enough: https://stackoverflow.com/a/8880717 - - docker exec vdebug-distro-test su - travis -c 'xvfb-run --auto-servernum bundle exec rake spec' + docker exec vdebug-distro-test su - travis -c 'xvfb-run --auto-servernum bundle exec rake spec' + elif [[ $TRAVIS_OS_NAME = linux ]]; then + python3-coverage run -m unittest discover + python3-coverage report -m --include="python3/vdebug/*" + xvfb-run bundle exec rake features + xvfb-run --auto-servernum bundle exec rake spec + else + python3-coverage run -m unittest discover + python3-coverage report -m --include="python3/vdebug/*" + bundle exec rake features + bundle exec rake spec + fi From 923568ee0eec3476772597112dda541efdb1d5a4 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Fri, 30 Nov 2018 08:58:51 +0100 Subject: [PATCH 10/31] reorder and fix yaml --- .travis.yml | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7ee1fc4a..57060980 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,15 +8,11 @@ dist: xenial matrix: include: - os: linux - env: - DOCKER: false + env: DOCKER=false - os: linux - env: - DOCKER: true - DISTRO: debian:9 + env: DOCKER=true DISTRO=debian:9 - os: osx - env: - DOCKER: false + env: DOCKER=false before_install: | set -e @@ -26,7 +22,9 @@ before_install: | fi install: | set -e - if $DOCKER; then + if [[ $TRAVIS_OS_NAME = osx ]]; then + brew update + elif $DOCKER; then docker exec --env=DEBIAN_FRONTEND=noninteractive vdebug-distro-test apt-get update; elif # Vim, php, xdebug, bundler and coverage are needed to run the tests. # Xvfb is needed to use the server feature of vim without a running X @@ -42,16 +40,19 @@ install: | # We are currently on docker 17.09 and the --workdir option for exec was # only introduced in 17.12. Therefore we have to use the shell with cd. docker exec -u travis vdebug-distro-test sh -c 'cd /travis && bundle install --path vendor/bundle' - elif [[ $TRAVIS_OS_NAME = linux ]]; then + else apt-get update apt-get install -y vim-gtk3 php-cli php-xdebug bundler python3-coverage xvfb locales bundle install --path vendor/bundle - else - brew update fi script: | set -e - if $DOCKER; then + if [[ $TRAVIS_OS_NAME = osx ]]; then + python3-coverage run -m unittest discover + python3-coverage report -m --include="python3/vdebug/*" + bundle exec rake features + bundle exec rake spec + elif $DOCKER; then # The tests have to be run with su(1) to get the right value for $LANG. # If docker is used to switch the user and just run sh(1) the locale setup # from above is not picked up. @@ -63,14 +64,9 @@ script: | # failures result from the xvfb from above no releasing the display fast # enough: https://stackoverflow.com/a/8880717 docker exec vdebug-distro-test su - travis -c 'xvfb-run --auto-servernum bundle exec rake spec' - elif [[ $TRAVIS_OS_NAME = linux ]]; then + else python3-coverage run -m unittest discover python3-coverage report -m --include="python3/vdebug/*" xvfb-run bundle exec rake features xvfb-run --auto-servernum bundle exec rake spec - else - python3-coverage run -m unittest discover - python3-coverage report -m --include="python3/vdebug/*" - bundle exec rake features - bundle exec rake spec fi From 73dd5f56eaf1d37fa991e750ca3f044974c8d9c9 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Fri, 30 Nov 2018 09:01:29 +0100 Subject: [PATCH 11/31] Add newlines --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 57060980..d0dcd376 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,6 +20,7 @@ before_install: | docker run --rm -d --name vdebug-distro-test -v $(pwd):/travis $DISTRO tail -f /dev/null; fi docker ps fi + install: | set -e if [[ $TRAVIS_OS_NAME = osx ]]; then @@ -45,6 +46,7 @@ install: | apt-get install -y vim-gtk3 php-cli php-xdebug bundler python3-coverage xvfb locales bundle install --path vendor/bundle fi + script: | set -e if [[ $TRAVIS_OS_NAME = osx ]]; then From d992c678ada6f4406b016c095c288e038a77eb3c Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Fri, 30 Nov 2018 09:02:21 +0100 Subject: [PATCH 12/31] fix --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index d0dcd376..64617567 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ matrix: before_install: | set -e if $DOCKER; then - docker run --rm -d --name vdebug-distro-test -v $(pwd):/travis $DISTRO tail -f /dev/null; fi + docker run --rm -d --name vdebug-distro-test -v $(pwd):/travis $DISTRO tail -f /dev/null docker ps fi @@ -26,7 +26,7 @@ install: | if [[ $TRAVIS_OS_NAME = osx ]]; then brew update elif $DOCKER; then - docker exec --env=DEBIAN_FRONTEND=noninteractive vdebug-distro-test apt-get update; elif + docker exec --env=DEBIAN_FRONTEND=noninteractive vdebug-distro-test apt-get update # Vim, php, xdebug, bundler and coverage are needed to run the tests. # Xvfb is needed to use the server feature of vim without a running X # server (which is needed for some tests). The locales package is used to From 6d9830106ac1723321c6585ec4cae175f01c0dcc Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Fri, 30 Nov 2018 09:04:37 +0100 Subject: [PATCH 13/31] add sudo --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 64617567..c6f6e578 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,8 +42,8 @@ install: | # only introduced in 17.12. Therefore we have to use the shell with cd. docker exec -u travis vdebug-distro-test sh -c 'cd /travis && bundle install --path vendor/bundle' else - apt-get update - apt-get install -y vim-gtk3 php-cli php-xdebug bundler python3-coverage xvfb locales + sudo apt-get update + sudo apt-get install -y vim-gtk3 php-cli php-xdebug bundler python3-coverage xvfb locales bundle install --path vendor/bundle fi From 30a6a1e013e7eafcbd1eff50b81fe96777e6b40a Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Fri, 30 Nov 2018 09:06:12 +0100 Subject: [PATCH 14/31] Use newer python --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index c6f6e578..35b3329f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,8 @@ notifications: secure: BksygPSsoRfvre27w6XQN9ooKB9C1n83Bw96YurvyDHJ6BYM2Gv9fW1Sj6NHpB8MQkMaJ+9gRiBSflkP+l80t3EXAdStuI/8EM/wZu1ov6bmYT/hYQ8HnULmmPNj8uVzsX13VGEUC/YY4osWuJFM1wh61dStoF+SKrpslqWCV4w= language: python +python: + - "3.5" dist: xenial matrix: include: From ac04b2c7dbcb2eb94f30fea93ad24affb6d4a558 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Fri, 30 Nov 2018 09:10:20 +0100 Subject: [PATCH 15/31] Remove lang from osx --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 35b3329f..2397c37e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,7 @@ matrix: - os: linux env: DOCKER=true DISTRO=debian:9 - os: osx + language: minimal env: DOCKER=false before_install: | From 5536caa56d59016c3a3480d14af499af82d4b4f1 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Fri, 30 Nov 2018 11:33:10 +0100 Subject: [PATCH 16/31] Switch to the minimal image --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2397c37e..78d9a837 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,9 +3,7 @@ notifications: slack: secure: BksygPSsoRfvre27w6XQN9ooKB9C1n83Bw96YurvyDHJ6BYM2Gv9fW1Sj6NHpB8MQkMaJ+9gRiBSflkP+l80t3EXAdStuI/8EM/wZu1ov6bmYT/hYQ8HnULmmPNj8uVzsX13VGEUC/YY4osWuJFM1wh61dStoF+SKrpslqWCV4w= -language: python -python: - - "3.5" +language: minimal dist: xenial matrix: include: From 732e40602cd328a9e90916d1dcd36a2ca5f36d1c Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Fri, 30 Nov 2018 11:59:38 +0100 Subject: [PATCH 17/31] debug : show versions on osx --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 78d9a837..08e6f10a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,6 +26,8 @@ install: | set -e if [[ $TRAVIS_OS_NAME = osx ]]; then brew update + which -a python{,3}{,-coverage{,3}} pip{,3} coverage{,3} bundle bundler rake vim php + vim --version elif $DOCKER; then docker exec --env=DEBIAN_FRONTEND=noninteractive vdebug-distro-test apt-get update # Vim, php, xdebug, bundler and coverage are needed to run the tests. From 4a6efdae4344d6f02be3c110cf602c93e7549336 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Fri, 30 Nov 2018 12:15:11 +0100 Subject: [PATCH 18/31] osx: install coverage --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 08e6f10a..4b10c7da 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,9 +25,12 @@ before_install: | install: | set -e if [[ $TRAVIS_OS_NAME = osx ]]; then - brew update + #brew update + pip3 install coverage which -a python{,3}{,-coverage{,3}} pip{,3} coverage{,3} bundle bundler rake vim php vim --version + php --version + python3 --version elif $DOCKER; then docker exec --env=DEBIAN_FRONTEND=noninteractive vdebug-distro-test apt-get update # Vim, php, xdebug, bundler and coverage are needed to run the tests. From 3d479e2a5c27bae06af7dc28b984ca03bba48aac Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Fri, 30 Nov 2018 12:17:26 +0100 Subject: [PATCH 19/31] remove which --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4b10c7da..aa627821 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ install: | if [[ $TRAVIS_OS_NAME = osx ]]; then #brew update pip3 install coverage - which -a python{,3}{,-coverage{,3}} pip{,3} coverage{,3} bundle bundler rake vim php + #which -a python{,3}{,-coverage{,3}} pip{,3} coverage{,3} bundle bundler rake vim php vim --version php --version python3 --version From 20b5eb81b150c083259b8d0472c187cf3c58358b Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Fri, 30 Nov 2018 12:23:05 +0100 Subject: [PATCH 20/31] osx fix coverage call --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index aa627821..ee59ed1c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -56,8 +56,8 @@ install: | script: | set -e if [[ $TRAVIS_OS_NAME = osx ]]; then - python3-coverage run -m unittest discover - python3-coverage report -m --include="python3/vdebug/*" + coverage3 run -m unittest discover + coverage3 report -m --include="python3/vdebug/*" bundle exec rake features bundle exec rake spec elif $DOCKER; then From 5282a65e24b07e3016ea3b202affa499c2b5bbe0 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Fri, 30 Nov 2018 12:24:32 +0100 Subject: [PATCH 21/31] improve ubuntu install --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index ee59ed1c..11238734 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,7 +37,7 @@ install: | # Xvfb is needed to use the server feature of vim without a running X # server (which is needed for some tests). The locales package is used to # set things up inside the container. - docker exec --env=DEBIAN_FRONTEND=noninteractive vdebug-distro-test apt-get install -y vim-gtk3 php-cli php-xdebug bundler python3-coverage xvfb locales + docker exec --env=DEBIAN_FRONTEND=noninteractive vdebug-distro-test apt-get install --no-install-recommends-y vim-gtk3 php-cli php-xdebug bundler python3-coverage xvfb locales # By default the locale inside the container is latin1. For consistent # tests we want to use utf8. docker exec vdebug-distro-test sh -c 'echo en_US.UTF-8 UTF-8 >> /etc/locale.gen' @@ -49,7 +49,7 @@ install: | docker exec -u travis vdebug-distro-test sh -c 'cd /travis && bundle install --path vendor/bundle' else sudo apt-get update - sudo apt-get install -y vim-gtk3 php-cli php-xdebug bundler python3-coverage xvfb locales + sudo apt-get install --no-install-recommends -y vim-gtk3 php-cli php-xdebug bundler python3-coverage xvfb bundle install --path vendor/bundle fi From c8b9d7b83cd53dadd913622e419b5440295cee20 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Fri, 30 Nov 2018 12:28:37 +0100 Subject: [PATCH 22/31] osx bundle install --- .travis.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 11238734..c27ba893 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,9 +28,10 @@ install: | #brew update pip3 install coverage #which -a python{,3}{,-coverage{,3}} pip{,3} coverage{,3} bundle bundler rake vim php - vim --version - php --version - python3 --version + # vim --version + # php --version + # python3 --version + bundle install --path vendor/bundle elif $DOCKER; then docker exec --env=DEBIAN_FRONTEND=noninteractive vdebug-distro-test apt-get update # Vim, php, xdebug, bundler and coverage are needed to run the tests. From 5376dfb529c1d8a809648cf5f16cd9af7f9cec5b Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Fri, 30 Nov 2018 12:31:08 +0100 Subject: [PATCH 23/31] fix strange byte --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c27ba893..52a6c22f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,7 +38,7 @@ install: | # Xvfb is needed to use the server feature of vim without a running X # server (which is needed for some tests). The locales package is used to # set things up inside the container. - docker exec --env=DEBIAN_FRONTEND=noninteractive vdebug-distro-test apt-get install --no-install-recommends-y vim-gtk3 php-cli php-xdebug bundler python3-coverage xvfb locales + docker exec --env=DEBIAN_FRONTEND=noninteractive vdebug-distro-test apt-get install --no-install-recommends -y vim-gtk3 php-cli php-xdebug bundler python3-coverage xvfb locales # By default the locale inside the container is latin1. For consistent # tests we want to use utf8. docker exec vdebug-distro-test sh -c 'echo en_US.UTF-8 UTF-8 >> /etc/locale.gen' From 35566a65df001d676a6793db5ecd5fc5adffb4c8 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Fri, 30 Nov 2018 12:48:39 +0100 Subject: [PATCH 24/31] osx insall vim with client server --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 52a6c22f..1b18931a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,6 +26,7 @@ install: | set -e if [[ $TRAVIS_OS_NAME = osx ]]; then #brew update + brew install vim --with-client-server pip3 install coverage #which -a python{,3}{,-coverage{,3}} pip{,3} coverage{,3} bundle bundler rake vim php # vim --version @@ -38,7 +39,7 @@ install: | # Xvfb is needed to use the server feature of vim without a running X # server (which is needed for some tests). The locales package is used to # set things up inside the container. - docker exec --env=DEBIAN_FRONTEND=noninteractive vdebug-distro-test apt-get install --no-install-recommends -y vim-gtk3 php-cli php-xdebug bundler python3-coverage xvfb locales + docker exec --env=DEBIAN_FRONTEND=noninteractive vdebug-distro-test apt-get install --no-install-recommends -y vim-gtk3 php-cli php-xdebug bundler python3-coverage xvfb locales xauth # By default the locale inside the container is latin1. For consistent # tests we want to use utf8. docker exec vdebug-distro-test sh -c 'echo en_US.UTF-8 UTF-8 >> /etc/locale.gen' From 60f4395238c6d8461919666e1f6f51180abd9151 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Fri, 30 Nov 2018 13:01:09 +0100 Subject: [PATCH 25/31] CHeck vim version --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 1b18931a..c835f137 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,6 +33,8 @@ install: | # php --version # python3 --version bundle install --path vendor/bundle + which -a vim + vim --version elif $DOCKER; then docker exec --env=DEBIAN_FRONTEND=noninteractive vdebug-distro-test apt-get update # Vim, php, xdebug, bundler and coverage are needed to run the tests. From ae2463466bcb51a015436cab5ece3de51d7eff61 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Fri, 30 Nov 2018 13:55:47 +0100 Subject: [PATCH 26/31] Install all vims on osx --- .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index c835f137..50629feb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,15 +26,17 @@ install: | set -e if [[ $TRAVIS_OS_NAME = osx ]]; then #brew update - brew install vim --with-client-server + brew install vim macvim neovim pip3 install coverage #which -a python{,3}{,-coverage{,3}} pip{,3} coverage{,3} bundle bundler rake vim php # vim --version # php --version # python3 --version bundle install --path vendor/bundle - which -a vim + which -a vim mvim nvim vim --version + mvim --version + nvim --version elif $DOCKER; then docker exec --env=DEBIAN_FRONTEND=noninteractive vdebug-distro-test apt-get update # Vim, php, xdebug, bundler and coverage are needed to run the tests. From bd84162d0f7d727322ad49a5cf9c48bd2e5be707 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Fri, 30 Nov 2018 14:03:58 +0100 Subject: [PATCH 27/31] remove plain vim --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 50629feb..fa21d99b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,7 +33,7 @@ install: | # php --version # python3 --version bundle install --path vendor/bundle - which -a vim mvim nvim + which -a mvim nvim vim --version mvim --version nvim --version From cfeff1ef6e26086e3d14afd1e59ec34fbbfc6337 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Fri, 30 Nov 2018 14:45:32 +0100 Subject: [PATCH 28/31] remove plain vim --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index fa21d99b..d0f4154e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,14 +26,14 @@ install: | set -e if [[ $TRAVIS_OS_NAME = osx ]]; then #brew update - brew install vim macvim neovim + brew install macvim neovim pip3 install coverage #which -a python{,3}{,-coverage{,3}} pip{,3} coverage{,3} bundle bundler rake vim php # vim --version # php --version # python3 --version bundle install --path vendor/bundle - which -a mvim nvim + which -a vim mvim nvim vim --version mvim --version nvim --version From 435962a967eac3818ad168476cacedfa0bcd729a Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Fri, 30 Nov 2018 15:29:22 +0100 Subject: [PATCH 29/31] remove neovim --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d0f4154e..30d641fd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,7 @@ install: | set -e if [[ $TRAVIS_OS_NAME = osx ]]; then #brew update - brew install macvim neovim + brew install macvim pip3 install coverage #which -a python{,3}{,-coverage{,3}} pip{,3} coverage{,3} bundle bundler rake vim php # vim --version From 77809b5b13801f791893da5c3d66a8ab592ae3f8 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Fri, 30 Nov 2018 15:41:53 +0100 Subject: [PATCH 30/31] replace macvim with neovim --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 30d641fd..dac16f68 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,7 @@ install: | set -e if [[ $TRAVIS_OS_NAME = osx ]]; then #brew update - brew install macvim + brew install neovim pip3 install coverage #which -a python{,3}{,-coverage{,3}} pip{,3} coverage{,3} bundle bundler rake vim php # vim --version From 7fa6344e13913c69c96d437f2590fdefba6b06f6 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Fri, 30 Nov 2018 15:50:08 +0100 Subject: [PATCH 31/31] remove version checks --- .travis.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index dac16f68..067ec3de 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,18 +25,10 @@ before_install: | install: | set -e if [[ $TRAVIS_OS_NAME = osx ]]; then - #brew update + #brew update brew install neovim pip3 install coverage - #which -a python{,3}{,-coverage{,3}} pip{,3} coverage{,3} bundle bundler rake vim php - # vim --version - # php --version - # python3 --version bundle install --path vendor/bundle - which -a vim mvim nvim - vim --version - mvim --version - nvim --version elif $DOCKER; then docker exec --env=DEBIAN_FRONTEND=noninteractive vdebug-distro-test apt-get update # Vim, php, xdebug, bundler and coverage are needed to run the tests.