forked from xmlsec/python-xmlsec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
56 lines (52 loc) · 2.06 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
environment:
matrix:
- python: 35
- python: 35-x64
- python: 36
- python: 36-x64
- python: 37
- python: 37-x64
- python: 38
- python: 38-x64
- python: 39
python_version: 3.9.0
- python: 39-x64
python_version: 3.9.0
install:
- ps: |
# from https://github.com/appveyor/build-images/blob/27bde614bc60d7ef7a8bc46182f4d7582fa11b56/scripts/Windows/install_python.ps1#L88-L108
function InstallPythonEXE($targetPath, $version) {
$urlPlatform = ""
if ($targetPath -match '-x64$') {
$urlPlatform = "-amd64"
}
Write-Host "Installing Python $version$urlPlatform to $($targetPath)..." -ForegroundColor Cyan
$downloadUrl = "https://www.python.org/ftp/python/$version/python-$version$urlPlatform.exe"
Write-Host "Downloading $($downloadUrl)..."
$exePath = "$env:TEMP\python-$version.exe"
(New-Object Net.WebClient).DownloadFile($downloadUrl, $exePath)
Write-Host "Installing..."
cmd /c start /wait $exePath /quiet TargetDir="$targetPath" Shortcuts=0 Include_launcher=1 InstallLauncherAllUsers=1 Include_debug=1
Remove-Item $exePath
Write-Host "Installed Python $version" -ForegroundColor Green
}
if ( -not ( Test-Path -Path C:\\Python$env:PYTHON -PathType Container ) ) {
InstallPythonEXE C:\\Python$env:PYTHON $env:PYTHON_VERSION
}
- SET PATH=C:\\Python%PYTHON%;c:\\Python%PYTHON%\\scripts;%PATH%
- python -m pip install -U pip wheel setuptools
build: off
build_script:
- python setup.py bdist_wheel
test: off
test_script:
- pip install -r requirements-test.txt
- pip install xmlsec --only-binary=xmlsec --no-index --find-links=dist
- pytest -v --color=yes --junitxml=unittests.xml
- ps: Get-ChildItem dist\*.whl | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
on_finish:
- ps: |
# archive test results at AppVeyor
$wc = New-Object 'System.Net.WebClient'
$wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\unittests.xml))
$LastExitCode = 0