From 9c44f2060fa9056cd81ea46e905a800000c0cbd2 Mon Sep 17 00:00:00 2001 From: Kalash96 <56406353+Kalash96@users.noreply.github.com> Date: Fri, 13 Nov 2020 11:33:43 +0100 Subject: [PATCH 1/4] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000..7d405f9ee --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,36 @@ +# Python package +# Create and test a Python package on multiple Python versions. +# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/python + +trigger: +- master + +pool: + vmImage: 'ubuntu-latest' +strategy: + matrix: + Python27: + python.version: '2.7' + Python35: + python.version: '3.5' + Python36: + python.version: '3.6' + Python37: + python.version: '3.7' + +steps: +- task: UsePythonVersion@0 + inputs: + versionSpec: '$(python.version)' + displayName: 'Use Python $(python.version)' + +- script: | + python -m pip install --upgrade pip + pip install -r requirements.txt + displayName: 'Install dependencies' + +- script: | + pip install pytest pytest-azurepipelines + pytest + displayName: 'pytest' From bc8a0d87d9785b33e3d428de31ac33f5b126f5a7 Mon Sep 17 00:00:00 2001 From: Kalash96 <56406353+Kalash96@users.noreply.github.com> Date: Fri, 13 Nov 2020 11:52:43 +0100 Subject: [PATCH 2/4] Update azure-pipelines.yml --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7d405f9ee..41cc71f93 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -19,6 +19,7 @@ strategy: Python37: python.version: '3.7' + steps: - task: UsePythonVersion@0 inputs: From d2c7aa92b6d2ef781466e0264c99c1e619c0cd4a Mon Sep 17 00:00:00 2001 From: Kalash96 <56406353+Kalash96@users.noreply.github.com> Date: Fri, 13 Nov 2020 11:55:14 +0100 Subject: [PATCH 3/4] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 41cc71f93..7d405f9ee 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -19,7 +19,6 @@ strategy: Python37: python.version: '3.7' - steps: - task: UsePythonVersion@0 inputs: From 651f6107aa7a29c1f8fd8dab8271d2529ca64ffb Mon Sep 17 00:00:00 2001 From: Kalash96 <56406353+Kalash96@users.noreply.github.com> Date: Fri, 13 Nov 2020 12:00:34 +0100 Subject: [PATCH 4/4] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index bc29ab4b3..d9a4d44f0 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Build Status](https://dev.azure.com/mohammedkalash/Azure_DevOps_Pipeline_Test/_apis/build/status/Kalash96.python-sample-vscode-flask-tutorial?branchName=master)](https://dev.azure.com/mohammedkalash/Azure_DevOps_Pipeline_Test/_build/latest?definitionId=1&branchName=master) + # Python/Flask Tutorial for Visual Studio Code * This sample contains the completed program from the tutorial, make sure to visit the link: [Using Flask in Visual Studio Code](https://code.visualstudio.com/docs/python/tutorial-flask). Intermediate steps are not included.