CI(AppVeyor): Move `validators.py` -> `devscripts/CI/`
[sqlconvert.git] / appveyor.yml
1 # Test on windows
2 # Heavily inspired by Oliver Grisel's appveyor-demo (https://github.com/ogrisel/python-appveyor-demo)
3 version: '{branch}-{build}'
4
5 cache:
6   - '%LOCALAPPDATA%\pip\Cache'
7
8 # Match travis
9 clone_depth: 50
10
11 services:
12   - postgresql
13
14 environment:
15   PGUSER: "postgres"
16   PGPASSWORD: "Password12!"
17
18   matrix:
19     - TOXENV: "py27"
20       PYTHON_VERSION: "2.7"
21       PYTHON_ARCH: "32"
22       PYTHON_HOME: "C:\\Python27"
23     - TOXENV: "py37"
24       PYTHON_VERSION: "3.7"
25       PYTHON_ARCH: "64"
26       PYTHON_HOME: "C:\\Python37-x64"
27     - TOXENV: "py27-postgres-w32"
28       PYTHON_VERSION: "2.7"
29       PYTHON_ARCH: "32"
30       PYTHON_HOME: "C:\\Python27"
31       db: postgresql
32     - TOXENV: "py37-postgres-w32"
33       PYTHON_VERSION: "3.7"
34       PYTHON_ARCH: "64"
35       PYTHON_HOME: "C:\\Python37-x64"
36       db: postgresql
37     - TOXENV: "py27-sqlite-w32"
38       PYTHON_VERSION: "2.7"
39       PYTHON_ARCH: "32"
40       PYTHON_HOME: "C:\\Python27"
41     - TOXENV: "py37-sqlite-w32"
42       PYTHON_VERSION: "3.7"
43       PYTHON_ARCH: "64"
44       PYTHON_HOME: "C:\\Python37-x64"
45     - TOXENV: "py27-flake8"
46       PYTHON_VERSION: "2.7"
47       PYTHON_ARCH: "32"
48       PYTHON_HOME: "C:\\Python27"
49     - TOXENV: "py37-flake8"
50       PYTHON_VERSION: "3.7"
51       PYTHON_ARCH: "64"
52       PYTHON_HOME: "C:\\Python37-x64"
53
54 install:
55   # Ensure we use the right python version
56   - "SET PATH=%PYTHON_HOME%;%PYTHON_HOME%\\Scripts;C:\\Program Files\\PostgreSQL\\9.5\\bin;%PATH%"
57   - "SET TOXPYTHON=%PYTHON_HOME%\\python.exe"
58   - "python --version"
59   - "python -c \"import struct; print(struct.calcsize('P') * 8)\""
60   - "python -m pip install --upgrade \"pip < 19.1\" setuptools"
61   - "pip install --upgrade \"tox < 3.1\" ppu"
62   - "pip --version"
63
64 # No build step - we don't have C extensions
65 build: false
66
67 test_script:
68   - "tox"
69
70 after_test:
71   - "remove-old-files.py -o 180 %LOCALAPPDATA%\\pip\\Cache"