From 1a4147f515ce29af2808797d2a5644b935a1a10c Mon Sep 17 00:00:00 2001 From: Temmar1991 Date: Mon, 28 Dec 2020 23:51:17 +0200 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..1ee861801 --- /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: +- main + +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 51aaa49004958a8ac7c460092139c46ba898dcb9 Mon Sep 17 00:00:00 2001 From: Temmar1991 Date: Tue, 29 Dec 2020 00:06:34 +0200 Subject: [PATCH 2/4] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 068a76fd5..e8bfce40e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Build Status](https://dev.azure.com/temmar1991/Azure%20Test%20Project/_apis/build/status/Temmar1991.python-sample-vscode-flask-tutorial?branchName=master)](https://dev.azure.com/temmar1991/Azure%20Test%20Project/_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. From 8a3759da944bd1432d2e21f4008b7995042c701e Mon Sep 17 00:00:00 2001 From: Temmar1991 Date: Tue, 29 Dec 2020 00:12:41 +0200 Subject: [PATCH 3/4] Change trigger branch to master --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1ee861801..7d405f9ee 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -4,7 +4,7 @@ # https://docs.microsoft.com/azure/devops/pipelines/languages/python trigger: -- main +- master pool: vmImage: 'ubuntu-latest' From d18ebe2b0d113841cd318972bd222f41595c84ee Mon Sep 17 00:00:00 2001 From: Temmar1991 Date: Tue, 29 Dec 2020 00:19:24 +0200 Subject: [PATCH 4/4] fix status badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e8bfce40e..8e24cc97c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://dev.azure.com/temmar1991/Azure%20Test%20Project/_apis/build/status/Temmar1991.python-sample-vscode-flask-tutorial?branchName=master)](https://dev.azure.com/temmar1991/Azure%20Test%20Project/_build/latest?definitionId=1&branchName=master) +[![Build Status](https://dev.azure.com/temmar1991/Azure%20Test%20Project/_apis/build/status/Temmar1991.python-sample-vscode-flask-tutorial?branchName=master)] # Python/Flask Tutorial for Visual Studio Code