| 1 |
hosts: |
| 2 |
bonsai.test: 127.0.0.1 |
| 3 |
|
| 4 |
image: Visual Studio 2019 |
| 5 |
|
| 6 |
environment: |
| 7 |
global: |
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\.appveyor\\run_with_env.cmd" |
| 12 |
|
| 13 |
matrix: |
| 14 |
- PYTHON: "C:\\Python39" |
| 15 |
PYTHON_VERSION: "3.9.x" |
| 16 |
PYTHON_ARCH: "32" |
| 17 |
|
| 18 |
- PYTHON: "C:\\Python39-x64" |
| 19 |
PYTHON_VERSION: "3.9.x" |
| 20 |
PYTHON_ARCH: "64" |
| 21 |
|
| 22 |
- PYTHON: "C:\\Python310" |
| 23 |
PYTHON_VERSION: "3.10.x" |
| 24 |
PYTHON_ARCH: "32" |
| 25 |
|
| 26 |
- PYTHON: "C:\\Python310-x64" |
| 27 |
PYTHON_VERSION: "3.10.x" |
| 28 |
PYTHON_ARCH: "64" |
| 29 |
|
| 30 |
- PYTHON: "C:\\Python311" |
| 31 |
PYTHON_VERSION: "3.11.x" |
| 32 |
PYTHON_ARCH: "32" |
| 33 |
|
| 34 |
- PYTHON: "C:\\Python311-x64" |
| 35 |
PYTHON_VERSION: "3.11.x" |
| 36 |
PYTHON_ARCH: "64" |
| 37 |
|
| 38 |
- PYTHON: "C:\\Python312" |
| 39 |
PYTHON_VERSION: "3.12.x" |
| 40 |
PYTHON_ARCH: "32" |
| 41 |
|
| 42 |
- PYTHON: "C:\\Python312-x64" |
| 43 |
PYTHON_VERSION: "3.12.x" |
| 44 |
PYTHON_ARCH: "64" |
| 45 |
|
| 46 |
install: |
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod ` |
| 53 |
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | ` |
| 54 |
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { ` |
| 55 |
throw "There are newer queued builds for this pull request, failing early." } |
| 56 |
|
| 57 |
- ps: .\\.appveyor\\InstallAD.ps1 |
| 58 |
- ps: Start-Sleep -s 5 |
| 59 |
- ps: Write-Output 'Finished installing Active Directory.' |
| 60 |
- ps: .\\.appveyor\\ConfigAD.ps1 |
| 61 |
- "ldifde -i -v -f .\\tests\\testenv\\ldifs\\users.ldif" |
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" |
| 67 |
|
| 68 |
|
| 69 |
- "python --version" |
| 70 |
- "python -c \"import struct; print(struct.calcsize('P') * 8)\"" |
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
- "%PYTHON%\\python.exe -m pip install --disable-pip-version-check --user --upgrade pip" |
| 75 |
- "%PYTHON%\\python.exe -m pip install poetry wheel build" |
| 76 |
- "%PYTHON%\\python.exe -m poetry config virtualenvs.create false" |
| 77 |
- "%PYTHON%\\python.exe -m poetry install --no-root -E gevent -E tornado -E trio" |
| 78 |
- "%PYTHON%\\python.exe -m pip list" |
| 79 |
|
| 80 |
build_script: |
| 81 |
|
| 82 |
- "%CMD_IN_ENV% python -m pip install -vvv --user ." |
| 83 |
|
| 84 |
before_test: |
| 85 |
- ps: "Start-Process python -ArgumentList .\\.ci\\delay.py -Verb runas" |
| 86 |
|
| 87 |
- ps: "(Get-Content .\\tests\\test.ini).replace('hostname = bonsai.test', 'hostname = appveyor-vm.bonsai.test') | Set-Content '.\\tests\\test.ini'" |
| 88 |
|
| 89 |
test_script: |
| 90 |
|
| 91 |
- for /f "tokens=*" %%i in ('python -c "import bonsai; print(bonsai.__file__[:-12])"') do set INSTALL_PATH="%%i" |
| 92 |
|
| 93 |
- "%CMD_IN_ENV% python -m pytest -v --junitxml=.\\test-results.xml --cov-config .coveragerc --cov-report=" |
| 94 |
|
| 95 |
after_test: |
| 96 |
|
| 97 |
- ps: $install_path = python -c "import bonsai; print(bonsai.__file__[:-12].replace('\\', '\\\\\\\\'))"; ` |
| 98 |
$project_path = $env:APPVEYOR_BUILD_FOLDER.Replace('\', '\\') + "\\src\\bonsai"; ` |
| 99 |
(Get-Content .\\.coverage) -replace $install_path, $project_path | Set-Content '.\\.coverage' |
| 100 |
- codecov |
| 101 |
|
| 102 |
- ps: $wc = New-Object 'System.Net.WebClient'; ` |
| 103 |
$wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\\test-results.xml)) |
| 104 |
|
| 105 |
- "%CMD_IN_ENV% python -m build -w" |
| 106 |
- ps: "ls dist" |
| 107 |
|
| 108 |
artifacts: |
| 109 |
|
| 110 |
- path: dist\* |
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|