appveyor.yml - Appveyor CI configuration

This was based on https://github.com/pyinstaller/pyinstaller/blob/develop/appveyor.yml

environment:
  matrix:
    - PYTHON: "C:\\Python38"
      PYTHON_VERSION: 3.8
      PYTHON_ARCH: 32

    - PYTHON: "C:\\Python37"
      PYTHON_VERSION: 3.7
      PYTHON_ARCH: 32

init:
  - ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%

install:

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)\""
 

Appveyor pip install: Make sure we’re using the latest version of pip. Avoid using just pip install -U pip, which produces:

1Exception:
2Traceback (most recent call last):
3  File "c:\python35\lib\shutil.py", line 381, in _rmtree_unsafe
4    os.unlink(fullname)
5PermissionError: [WinError 5] Access is denied: 'C:\\Users\\appveyor\\AppData\\Local\\Temp\\1\\pip-dghcgnoj-uninstall\\python35\\scripts\\pip.exe'
  - python -m pip install -U pip
 

Appveyor pip install command: In order to test, use pip to:

  • -e: Put CodeChat in the Python path.

  • .[test]: Install CodeChat’s test dependencies.

I can’t find a way to do this using python setup.py develop, so I’m using pip.

  - pip install -e .[test]
 

Install Graphviz, to allow building the docs.

  - choco install graphviz

Register it, to avoid the Format: "png" not recognized. Use one of... error.

  - dot -c

build: none

test_script:
  - python -m pytest ./test