From 56fbf533ac066d52e811ae67f0f8b0d07490a707 Mon Sep 17 00:00:00 2001 From: Alexey Stepanov Date: Mon, 19 Nov 2018 14:07:21 +0100 Subject: [PATCH] Prepare CD for windows Enable can be done by direct push only Signed-off-by: Alexey Stepanov --- azure-pipelines.yml | 89 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 87 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5cce583..350ac0b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -4,8 +4,49 @@ # https://docs.microsoft.com/azure/devops/pipelines/languages/python jobs: +- job: 'Test_pure_python' + pool: + vmIMage: 'VS2017-Win2016' + strategy: + maxParallel: 6 + matrix: + Python35: + python.version: '3.5' + Python36: + python.version: '3.6' + Python37: + python.version: '3.7' + + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: '$(python.version)' + architecture: 'x64' + + - script: | + python -m pip install --upgrade pip + pip install -U setuptools + pip install -r requirements.txt + displayName: 'Install dependencies' + + - script: | + pip install -Ue . + displayName: 'Install' + + - script: | + pip install pytest pytest-sugar -- job: 'Test' + pytest -vvv --junitxml=unit_result.xml test + displayName: 'pytest' + + - task: PublishTestResults@2 + inputs: + testResultsFiles: '**/unit_result.xml' + testRunTitle: 'Python $(python.version)' + condition: succeededOrFailed() + + +- job: 'Test_Cythonized' pool: vmIMage: 'VS2017-Win2016' strategy: @@ -24,7 +65,10 @@ jobs: versionSpec: '$(python.version)' architecture: 'x64' - - script: python -m pip install --upgrade pip && pip install -U setuptools && pip install -r build_requirements.txt + - script: | + python -m pip install --upgrade pip + pip install -U setuptools + pip install -r build_requirements.txt displayName: 'Install dependencies' - script: | @@ -43,3 +87,44 @@ jobs: testResultsFiles: '**/unit_result.xml' testRunTitle: 'Python $(python.version)' condition: succeededOrFailed() + + +#- job: 'Build_and_deploy' +# dependsOn: +# - Test_pure_python +# - Test_Cythonized +# condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/')) +# pool: +# vmIMage: 'VS2017-Win2016' +# strategy: +# maxParallel: 6 +# matrix: +# Python35: +# python.version: '3.5' +# Python36: +# python.version: '3.6' +# Python37: +# python.version: '3.7' +# +# steps: +# - task: UsePythonVersion@0 +# inputs: +# versionSpec: '$(python.version)' +# architecture: 'x64' +# +# - script: | +# python -m pip install --upgrade pip +# pip install -U setuptools +# pip install -r build_requirements.txt +# displayName: 'Install dependencies' +# +# - script: | +# python setup.py bdist_wheel +# displayName: 'Build' +# +# - task: TwineAuthenticate@0 +# inputs: +# externalFeeds: 'PyPI' +# +# - script: "twine -r {PyPI/logwrap} --config-file $(PYPIRC_PATH) dist/logwrap-*" +# displayName: 'Deploy'