From 48b49abccfad9fd3520d3b21031e96dd5d63bf14 Mon Sep 17 00:00:00 2001 From: Oliverpool Date: Fri, 30 Oct 2015 13:18:51 +0100 Subject: [PATCH] Add windows tests on AppVeyor --- .appveyor.yml | 47 +++++++++++++++++++++++ patacrep/songbook/__init__.py | 0 test/test_compilation/test_compilation.py | 4 +- tox.ini | 2 +- 4 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 .appveyor.yml create mode 100644 patacrep/songbook/__init__.py diff --git a/.appveyor.yml b/.appveyor.yml new file mode 100644 index 00000000..5f929665 --- /dev/null +++ b/.appveyor.yml @@ -0,0 +1,47 @@ +environment: + matrix: + - PYTHON: "C:\\Python34" + PYTHON_VERSION: "3.4.x" # currently 3.4.3 + PYTHON_ARCH: "32" + +install: + # Download setup scripts and unzip + - ps: "wget https://github.com/cloudify-cosmo/appveyor-utils/archive/master.zip -OutFile ./master.zip" + - "7z e master.zip */appveyor/* -oappveyor" + + # Install Python (from the official .msi of http://python.org) and pip when + # not already installed. + - "powershell ./appveyor/install.ps1" + + # Prepend newly installed Python to the PATH of this build (this cannot be + # done from inside the powershell script as it would require to restart + # the parent CMD process). + - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" + + # Check that we have the expected version and architecture for Python + - "python --version" + - "python -c \"import struct; print(struct.calcsize('P') * 8)\"" + + # Install miktex portable + - ps: "wget http://mirrors.ctan.org/systems/win32/miktex/setup/miktex-portable-2.9.5719.exe -OutFile ./miktex-portable.exe" + - "7z x miktex-portable.exe * -aot -omiktex > nul" + + #- cmd: dir .\miktex\miktex\bin + + - cmd: set PATH=%PATH%;C:\projects\patacrep\miktex\miktex\bin + #- cmd: echo %PATH% + + #- cmd: C:\projects\patacrep\miktex\miktex\bin\lualatex.exe --version + - cmd: lualatex.exe --version + +build: false # Not a C# project, build stuff at the test step instead. + +before_test: + - "pip install tox" + +test_script: + - "tox" + +# Cache Miktex zip install +cache: +- C:\projects\patacrep\miktex-portable.exe -> .appveyor.yml diff --git a/patacrep/songbook/__init__.py b/patacrep/songbook/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/test/test_compilation/test_compilation.py b/test/test_compilation/test_compilation.py index efb6ebe4..3b14088b 100644 --- a/test/test_compilation/test_compilation.py +++ b/test/test_compilation/test_compilation.py @@ -96,8 +96,8 @@ class FileTest(unittest.TestCase, metaclass=dynamic.DynamicTest): @classmethod def _create_compilation_test(cls, base): """Return a function testing that `base.tex` is correctly compiled.""" - @unittest.skipIf('TRAVIS' in os.environ, - "Travis does not support lualatex compilation yet") + @unittest.skipIf('TRAVIS' in os.environ or 'APPVEYOR' in os.environ, + "Travis and AppVeyor do not support lualatex compilation yet") def test_compilation(self): """Test that `base` is rendered to pdf.""" # Check compilation diff --git a/tox.ini b/tox.ini index 1b6a3337..99c71416 100644 --- a/tox.ini +++ b/tox.ini @@ -7,7 +7,7 @@ envlist = py34, lint [testenv] commands = {envpython} setup.py test -passenv = TRAVIS +passenv = TRAVIS APPVEYOR deps = [testenv:lint]