/
appveyor.yml
102 lines (95 loc) · 3.28 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# Install SQLObject on windows and test against MS SQL server and postgres
# Heavily inspired by Oliver Grisel's appveyor-demo (https://github.com/ogrisel/python-appveyor-demo)
# and Michael Sverdlik's appveyor-utils (https://github.com/cloudify-cosmo/appveyor-utils)
version: 3.3.{build}
# Match travis
clone_depth: 50
services:
- mysql
- postgresql
environment:
MYSQL_PWD: "Password12!"
PGUSER: "postgres"
PGPASSWORD: "Password12!"
matrix:
# from https://www.appveyor.com/docs/installed-software/#python
- PYTHON: "C:\\Python27"
db: mssql2014
TOX_ENV: "py27-mssql-w32"
- PYTHON: "C:\\Python34"
db: mssql2014
TOX_ENV: "py34-mssql-w32"
- PYTHON: "C:\\Python27"
db: mysql
TOX_ENV: "py27-mysql-connector-w32"
- PYTHON: "C:\\Python34"
db: mysql
TOX_ENV: "py34-mysql-connector-w32"
- PYTHON: "C:\\Python27"
db: postgresql
TOX_ENV: "py27-postgres-psycopg-w32"
- PYTHON: "C:\\Python27-x64"
db: postgresql
TOX_ENV: "py27-postgres-psycopg-w32"
- PYTHON: "C:\\Python34"
db: postgresql
TOX_ENV: "py34-postgres-psycopg-w32"
- PYTHON: "C:\\Python34-x64"
db: postgresql
TOX_ENV: "py34-postgres-psycopg-w32"
- PYTHON: "C:\\Python35"
db: postgresql
TOX_ENV: "py35-postgres-psycopg-w32"
- PYTHON: "C:\\Python35-x64"
db: postgresql
TOX_ENV: "py35-postgres-psycopg-w32"
- PYTHON: "C:\\Python27"
TOX_ENV: "py27-sqlite-w32"
- PYTHON: "C:\\Python27-x64"
TOX_ENV: "py27-sqlite-w32"
- PYTHON: "C:\\Python34"
TOX_ENV: "py34-sqlite-w32"
- PYTHON: "C:\\Python34-x64"
TOX_ENV: "py34-sqlite-w32"
- PYTHON: "C:\\Python35"
TOX_ENV: "py35-sqlite-w32"
- PYTHON: "C:\\Python35-x64"
TOX_ENV: "py35-sqlite-w32"
- PYTHON: "C:\\Python27"
TOX_ENV: "py27-sqlite-memory-w32"
- PYTHON: "C:\\Python27-x64"
TOX_ENV: "py27-sqlite-memory-w32"
- PYTHON: "C:\\Python34"
TOX_ENV: "py34-sqlite-memory-w32"
- PYTHON: "C:\\Python34-x64"
TOX_ENV: "py34-sqlite-memory-w32"
- PYTHON: "C:\\Python35"
TOX_ENV: "py35-sqlite-memory-w32"
- PYTHON: "C:\\Python35-x64"
TOX_ENV: "py35-sqlite-memory-w32"
install:
# Ensure we use the right python version
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;C:\\Program Files\\MySQL\\MySQL Server 5.7\\bin;C:\\Program Files\\PostgreSQL\\9.5\\bin;%PATH%"
- "python --version"
- "pip install -r requirements.txt"
- "pip install tox"
# Enable TCP for mssql
# (from appveyor documentation)
- ps: |
[reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo") | Out-Null
[reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.SqlWmiManagement") | Out-Null
$serverName = $env:COMPUTERNAME
$instanceName = 'SQL2014'
$smo = 'Microsoft.SqlServer.Management.Smo.'
$wmi = new-object ($smo + 'Wmi.ManagedComputer')
$uri = "ManagedComputer[@Name='$serverName']/ServerInstance[@Name='$instanceName']/ServerProtocol[@Name='Tcp']"
$Tcp = $wmi.GetSmoObject($uri)
$Tcp.IsEnabled = $true
$TCP.alter()
Set-Service SQLBrowser -StartupType Manual
Start-Service SQLBrowser
Start-Service "MSSQL`$$instanceName"
# Not a C project, so no build step
build: false
test_script:
- "tox -e %TOX_ENV%"