Browse Source

Add windows tests on AppVeyor

pull/149/head
Oliverpool 9 years ago
parent
commit
48b49abccf
  1. 47
      .appveyor.yml
  2. 0
      patacrep/songbook/__init__.py
  3. 4
      test/test_compilation/test_compilation.py
  4. 2
      tox.ini

47
.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

0
patacrep/songbook/__init__.py

4
test/test_compilation/test_compilation.py

@ -96,8 +96,8 @@ class FileTest(unittest.TestCase, metaclass=dynamic.DynamicTest):
@classmethod @classmethod
def _create_compilation_test(cls, base): def _create_compilation_test(cls, base):
"""Return a function testing that `base.tex` is correctly compiled.""" """Return a function testing that `base.tex` is correctly compiled."""
@unittest.skipIf('TRAVIS' in os.environ, @unittest.skipIf('TRAVIS' in os.environ or 'APPVEYOR' in os.environ,
"Travis does not support lualatex compilation yet") "Travis and AppVeyor do not support lualatex compilation yet")
def test_compilation(self): def test_compilation(self):
"""Test that `base` is rendered to pdf.""" """Test that `base` is rendered to pdf."""
# Check compilation # Check compilation

2
tox.ini

@ -7,7 +7,7 @@ envlist = py34, lint
[testenv] [testenv]
commands = {envpython} setup.py test commands = {envpython} setup.py test
passenv = TRAVIS passenv = TRAVIS APPVEYOR
deps = deps =
[testenv:lint] [testenv:lint]

Loading…
Cancel
Save