-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
63 lines (54 loc) · 1.99 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
# Heavily inspired by Oliver Grisel's appveyor-demo (https://github.com/ogrisel/python-appveyor-demo)
version: '{branch}-{build}'
# Only test master and pull requests; skip tags.
# Other branches can allow themselves.
branches:
only:
- master
skip_branch_with_pr: false
skip_tags: false
cache:
- '%LOCALAPPDATA%\pip\Cache'
# Match travis
clone_depth: 50
environment:
matrix:
- PYTHON_VERSION: "3.4"
PYTHON_ARCH: "32"
PYTHON_HOME: "C:\\Python34"
db: mssql2014
install:
# 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"
# Ensure we use the right python version
- "SET PATH=%PYTHON_HOME%;%PYTHON_HOME%\\Scripts;%PATH%"
- "python --version"
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""
- "pip --version"
#- "pip install --upgrade pip setuptools pymssql ppu"
- "pip install --upgrade pip setuptools pytest pymssql SQLObject ppu"
# No build step
build: false
test_script:
- sqlcmd -U sa -P "Password12!" -S .\SQL2014 -Q "CREATE DATABASE sqlobject_test"
- python test_pymssql.py
- python test_sqlobject.py
on_failure:
- type "C:\Program Files\Microsoft SQL Server\MSSQL14.SQL2017\MSSQL\LOG\ERRORLOG"
after_test:
- sqlcmd -U sa -P "Password12!" -S .\SQL2014 -Q "DROP DATABASE sqlobject_test"
- remove-old-files.py -o 180 %LOCALAPPDATA%\\pip\\Cache