From 548d987409e7523de853281e9046690383b6abed Mon Sep 17 00:00:00 2001 From: Quantum Date: Sun, 19 Nov 2017 19:41:35 -0500 Subject: [PATCH] Let Travis test this code. --- .travis.yml | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..cd8e9ee --- /dev/null +++ b/.travis.yml @@ -0,0 +1,46 @@ +sudo: required +dist: trusty +language: python +python: + - 2.7 + - 3.4 + - 3.5 + - 3.6 +addons: + apt: + packages: + - xdotool + - wmctrl + - fluxbox +cache: + directories: + - $HOME/.cache/pip +before_cache: + - rm -f $HOME/.cache/pip/log/debug.log +install: + - pip install codecov + - pip install -e . +before_script: + - export DISPLAY=:99.0 + - sh -e /etc/init.d/xvfb start + - sleep 3 + - fluxbox & + - sleep 3 +script: + - timeout -k 30s 30s coverage run --source=_2048 -m _2048 & + - sleep 3 + - > + xdotool search '2048: In Python!' windowactivate --sync + key --clearmodifiers Up + key --clearmodifiers Down + key --clearmodifiers Left + key --clearmodifiers Right + key --clearmodifiers Up + key --clearmodifiers Down + key --clearmodifiers Left + key --clearmodifiers Right + - sleep 10 + - "wmctrl -F -c '2048: In Python!'" + - wait %2 +after_script: + - codecov