mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Try new appveyor config
- Auto abort re-built PRs - Better leverage of caching - Better exit handling Signed-off-by: Dan Ryan <dan@danryan.co> Fix appveyor config Signed-off-by: Dan Ryan <dan@danryan.co> Fix syntax error Signed-off-by: Dan Ryan <dan@danryan.co> Try tox with detox Signed-off-by: Dan Ryan <dan@danryan.co> Slight tweak? Signed-off-by: Dan Ryan <dan@danryan.co> Back to powershell Signed-off-by: Dan Ryan <dan@danryan.co>
This commit is contained in:
+63
-36
@@ -4,54 +4,81 @@ version: 1.0.{build}
|
||||
skip_branch_with_pr: true
|
||||
|
||||
init:
|
||||
- ps: >-
|
||||
|
||||
- git config --global core.sharedRepository true
|
||||
- git config --global core.longpaths true
|
||||
- git config --global core.autocrlf input
|
||||
git config --global core.sharedRepository true
|
||||
|
||||
git config --global core.longpaths true
|
||||
|
||||
git config --global core.autocrlf input
|
||||
|
||||
if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
|
||||
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
|
||||
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
|
||||
Write-Host "There are newer queued builds for this pull request, skipping build."
|
||||
Exit-AppveyorBuild
|
||||
}
|
||||
|
||||
If (($env:SKIP_NOTAG -eq "true") -and ($env:APPVEYOR_REPO_TAG -ne "true")) {
|
||||
Write-Host "Skipping build, not at a tag."
|
||||
Exit-AppveyorBuild
|
||||
}
|
||||
|
||||
environment:
|
||||
|
||||
PYPI_VENDOR_DIR: '.\tests\pypi\'
|
||||
GIT_ASK_YESNO: 'false'
|
||||
SHELL: 'windows'
|
||||
PYTHON_ARCH: '64'
|
||||
PYTHONIOENCODING: 'utf-8'
|
||||
PYPI_VENDOR_DIR: .\tests\pypi\
|
||||
PYTHONIOENCODING: utf-8
|
||||
GIT_ASK_YESNO: false
|
||||
SHELL: windows
|
||||
PYTHON_ARCH: 64
|
||||
APPVEYOR_SAVE_CACHE_ON_ERROR: true
|
||||
APPVEYOR_SKIP_FINALIZE_ON_EXIT: true
|
||||
|
||||
matrix:
|
||||
|
||||
- PYTHON: 'C:\Python27-x64'
|
||||
PYTHON_VERSION: '2.7.x'
|
||||
TEST_SUITE: 'not install'
|
||||
- PYTHON: C:\Python27-x64
|
||||
PYTHON_VERSION: 2.7.x
|
||||
PIPENV_PYTHON: 2.7
|
||||
|
||||
- PYTHON: 'C:\Python27-x64'
|
||||
PYTHON_VERSION: '2.7.x'
|
||||
TEST_SUITE: 'install'
|
||||
PYTEST_ADDOPTS: '--cache-clear'
|
||||
RUN_INTEGRATION_TESTS: 'True'
|
||||
- PYTHON: C:\Python36-x64
|
||||
PYTHON_VERSION: 3.6.x
|
||||
PIPENV_PYTHON: 3.6
|
||||
|
||||
- PYTHON: 'C:\Python36-x64'
|
||||
PYTHON_VERSION: '3.6.x'
|
||||
TEST_SUITE: 'not install'
|
||||
|
||||
- PYTHON: 'C:\Python36-x64'
|
||||
PYTHON_VERSION: '3.6.x'
|
||||
TEST_SUITE: 'install'
|
||||
PYTEST_ADDOPTS: '--cache-clear'
|
||||
RUN_INTEGRATION_TESTS: 'True'
|
||||
|
||||
install:
|
||||
- 'set PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%'
|
||||
- '%PYTHON%\python.exe -m pip install --upgrade pip'
|
||||
- '%PYTHON%\python.exe -m pip install -e .'
|
||||
- '%PYTHON%\python.exe -m pipenv run pip install -e .'
|
||||
- '%PYTHON%\python.exe -m pipenv install --dev'
|
||||
- '%PYTHON%\python.exe -m pipenv --venv'
|
||||
- '%PYTHON%\python.exe -m pipenv --py'
|
||||
- '%PYTHON%\python.exe -m pipenv run python --version'
|
||||
- ps: >-
|
||||
|
||||
$script_path = Join-Path -path $env:PYTHON -childpath Scripts
|
||||
|
||||
$py_exe = Join-Path -path $env:PYTHON -childpath python.exe
|
||||
|
||||
$pipenv_exe = Join-Path -path $script_path -childpath pipenv.exe
|
||||
|
||||
$env:PATH = "$py_path;$script_path;$env:PATH"
|
||||
|
||||
Invoke-Expression "$py_exe -m pip install --upgrade pip"
|
||||
|
||||
Invoke-Expression "$py_exe -m pip install -e ."
|
||||
|
||||
Invoke-Expression "$pipenv_exe install --dev"
|
||||
|
||||
Invoke-Expression "$pipenv_exe --venv"
|
||||
|
||||
Invoke-Expression "$pipenv_exe --py"
|
||||
|
||||
cache:
|
||||
- '%LocalAppData%\pip\cache'
|
||||
- '%LocalAppData%\pip\cache'
|
||||
- '%LocalAppData%\pipenv\cache'
|
||||
|
||||
test_script:
|
||||
- 'if "%RUN_INTEGRATION_TESTS%" == "True" (rmdir /s /q %LocalAppData%\pip\cache)'
|
||||
- '%PYTHON%\python.exe -m pipenv run pytest -v -n 4 -m "%TEST_SUITE%" tests'
|
||||
|
||||
- ps: >-
|
||||
$script_path = Join-Path -path $env:PYTHON -childpath Scripts
|
||||
|
||||
$py_exe = Join-Path -path $env:PYTHON -childpath python.exe
|
||||
|
||||
$pipenv_exe = Join-Path -path $script_path -childpath pipenv.exe
|
||||
|
||||
$env:PATH = "$py_path;$script_path;$env:PATH"
|
||||
|
||||
Invoke-Expression "$pipenv_exe run pytest -v -n 4 --ignore=pipenv\patched --ignore=pipenv\vendor tests"
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
[tox]
|
||||
envlist = 2.7,
|
||||
3.6
|
||||
|
||||
[testenv]
|
||||
setenv = PYPI_VENDOR_DIR = {toxinidir}/tests/pypi/
|
||||
PIPENV_PYTHON = {envname}
|
||||
PYTHONIOENCODING = utf-8
|
||||
PIPENV_IGNORE_VIRTUALENVS = 1
|
||||
passenv = http_proxy https_proxy no_proxy SSL_CERT_FILE TOXENV CI TRAVIS TRAVIS_* APPVEYOR APPVEYOR_* CODECOV_* PIPENV_* PIP_* TEST_SUITE PYTHONIOENCODING GIT_ASK_YESNO SHELL PYTHON_ARCH
|
||||
deps = -e .
|
||||
pytest
|
||||
basepython = python{envname}
|
||||
commands = python -m pip install -e .
|
||||
python -m pipenv install --dev
|
||||
pipenv run pytest {posargs:-v -n 4 --ignore="{toxinidir}/pipenv/patched" --ignore="{toxinidir}/pipenv/vendor" -m "{env:TEST_SUITE}" tests}
|
||||
Reference in New Issue
Block a user