From 6a15ee24560b37f2a09a26f84b6dc4dbd43d635d Mon Sep 17 00:00:00 2001 From: Dan Ryan Date: Tue, 26 Jun 2018 18:42:39 -0400 Subject: [PATCH] Test updates Signed-off-by: Dan Ryan --- appveyor.yml | 62 +++++++++++++++++++++++++++++++++++++++------------- run-tests.sh | 7 ++++++ 2 files changed, 54 insertions(+), 15 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 2a172f02..f07cea23 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -13,36 +13,66 @@ init: 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\ - PYTHONIOENCODING: utf-8 - GIT_ASK_YESNO: false - SHELL: windows - PYTHON_ARCH: 64 - APPVEYOR_SAVE_CACHE_ON_ERROR: true - APPVEYOR_SKIP_FINALIZE_ON_EXIT: true + PYPI_VENDOR_DIR: '.\tests\pypi\' + GIT_ASK_YESNO: 'false' + SHELL: 'windows' + PYTHON_ARCH: '64' + PYTHONIOENCODING: 'utf-8' matrix: - - PYTHON: C:\Python27-x64 - PYTHON_VERSION: 2.7.x - PIPENV_PYTHON: 2.7 + - PYTHON: 'C:\Python27-x64' + PYTHON_VERSION: '2.7.x' + TEST_SUITE: 'not install' + + - 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' + TEST_SUITE: 'not install' + + - PYTHON: 'C:\Python36-x64' + PYTHON_VERSION: '3.6.x' + TEST_SUITE: 'install' + PYTEST_ADDOPTS: '--cache-clear' + RUN_INTEGRATION_TESTS: 'True' + + - PYTHON: 'C:\Python37-x64' + PYTHON_VERSION: '3.7.x' + TEST_SUITE: 'not install' + + - PYTHON: 'C:\Python37-x64' + PYTHON_VERSION: '3.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 install: @@ -56,7 +86,7 @@ install: $env:PATH = "$py_path;$script_path;$env:PATH" - Invoke-Expression "$py_exe -m pip install --upgrade pip" + Invoke-Expression "$py_exe -m pip install --upgrade pip invoke" Invoke-Expression "$py_exe -m pip install -e ." @@ -81,4 +111,6 @@ test_script: $env:PATH = "$py_path;$script_path;$env:PATH" - Invoke-Expression "$pipenv_exe run pytest -v -n 4 --ignore=pipenv\patched --ignore=pipenv\vendor tests" + If (($env:RUN_INTEGRATION_TESTS -eq "True") -and ($env:PYTHON_VERSION -eq "3.6.x")) { Invoke-Expression "invoke vendoring.update" } + + Invoke-Expression "$pipenv_exe run pytest -v -n 4 --ignore=pipenv\patched --ignore=pipenv\vendor -m $env:TEST_SUITE tests" diff --git a/run-tests.sh b/run-tests.sh index a7059322..3f3ca7a0 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -41,8 +41,10 @@ fi echo "Installing dependencies…" PIPENV_PYTHON=2.7 pipenv run pip install -e . --upgrade PIPENV_PYTHON=3.6 pipenv run pip install -e . --upgrade +PIPENV_PYTHON=3.7 pipenv run pip install -e . --upgrade PIPENV_PYTHON=2.7 pipenv install --dev PIPENV_PYTHON=3.6 pipenv install --dev +PIPENV_PYTHON=3.7 pipenv install --dev echo "$ pipenv run time pytest -v -n auto tests -m \"$TEST_SUITE\"" # PIPENV_PYTHON=2.7 pipenv run time pytest -v -n auto tests -m "$TEST_SUITE" | prefix 2.7 & @@ -50,5 +52,10 @@ echo "$ pipenv run time pytest -v -n auto tests -m \"$TEST_SUITE\"" # Better to run them sequentially. PIPENV_PYTHON=2.7 pipenv run time pytest -v -n auto tests -m "$TEST_SUITE" PIPENV_PYTHON=3.6 pipenv run time pytest -v -n auto tests -m "$TEST_SUITE" +PIPENV_PYTHON=3.7 pipenv run time pytest -v -n auto tests -m "$TEST_SUITE" + +# test revendoring +pip install --upgrade invoke +inv vendoring.update # Cleanup junk. rm -fr .venv