Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travis ci #2

Merged
merged 10 commits into from
Feb 12, 2014
8 changes: 5 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ python:
- "2.7"

before_install:
- sudo add-apt-repository ppa:ubuntu-wine/ppa -y
- sudo apt-get update
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"

install:
- sudo apt-get install wine
- wget http://www.python.org/ftp/python/2.7.6/python-2.7.6.msi
- wine msiexec /i python-2.7.6.msi
- sh scripts/setup_tests_wine.sh

script:
- echo "Ok"
- sh scripts/run_tests_wine.sh
12 changes: 12 additions & 0 deletions scripts/run_tests_wine.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#! /bin/sh
set -e

export DISPLAY=:99.0

PYTHON="c:/Python27/python.exe"
COVERAGE="c:/Python27/Scripts/coverage.exe"

wine ${PYTHON} -m nose.core mini_pywin32
wine ${COVERAGE} erase
wine ${COVERAGE} run -m nose.core mini_pywin32
wine ${COVERAGE} report --include=mini_pywin32*
21 changes: 21 additions & 0 deletions scripts/setup_tests_wine.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#! /bin/sh
set -e

export DISPLAY=:99.0

PYTHON="c:/Python27/python.exe"
EASY_INSTALL="c:/Python27/Scripts/easy_install.exe"
PIP="c:/Python27/Scripts/pip.exe"

wget http://www.python.org/ftp/python/2.7.6/python-2.7.6.msi
wine msiexec /i python-2.7.6.msi /qn

wget https://pypi.python.org/packages/source/s/setuptools/setuptools-2.2.tar.gz
tar xf setuptools-2.2.tar.gz
(cd setuptools-2.2 && wine ${PYTHON} setup.py install)

wine ${EASY_INSTALL} nose coverage

wget http://sourceforge.net/projects/pywin32/files/pywin32/Build%20218/pywin32-218.win32-py2.7.exe/download -O pywin32-218.win32-py2.7.exe

wine ${EASY_INSTALL} pywin32-218.win32-py2.7.exe