-
Notifications
You must be signed in to change notification settings - Fork 52
/
appveyor.yml
50 lines (43 loc) · 1.39 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
version: 1.0.{build}
os: Visual Studio 2019
environment:
INAPPVEYOR: 1
HOST: localhost
SQLUSER: sa
SQLPASSWORD: Password12!
DATABASE: test
matrix:
- PYTHON: "C:\\Python312"
SQLINSTANCE: SQL2019
- PYTHON: "C:\\Python312-x64"
SQLINSTANCE: SQL2019
- PYTHON: "C:\\Python38-x64"
SQLINSTANCE: SQL2017
install:
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- python --version
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""
- pip install -r requirements.txt
- pip install -r test_requirements.txt
- pip uninstall -y python-tds
build_script:
- python setup.py sdist
before_test:
# setup SQL Server
- ps: |
$instanceName = $env:SQLINSTANCE
Start-Service "MSSQL`$$instanceName"
Start-Service "SQLBrowser"
- sqlcmd -S "(local)\%SQLINSTANCE%" -Q "Use [master]; CREATE DATABASE test; ALTER DATABASE test SET READ_COMMITTED_SNAPSHOT ON; ALTER DATABASE test SET ALLOW_SNAPSHOT_ISOLATION ON"
- sqlcmd -S "(local)\%SQLINSTANCE%" -h -1 -Q "set nocount on; Select @@version"
test_script:
- mypy src
- ruff check src
- set PYTHONPATH=src
- pytest -v --junitxml=junit-results.xml --cov=./
- ps: |
$wc = New-Object 'System.Net.WebClient'
$url = "https://ci.appveyor.com/api/testresults/junit/$env:APPVEYOR_JOB_ID"
$wc.UploadFile($url, (Resolve-Path .\junit-results.xml));
Write-Output $url
- codecov