From 1c5c2d9c14badd10ee16890de356dfb56bca87bf Mon Sep 17 00:00:00 2001 From: Machiel Groeneveld <309370+machielg@users.noreply.github.com> Date: Fri, 9 Sep 2022 13:42:54 +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..6f401c616 --- /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 4b616d57ac0e940f950c97d4a98f3b0389c9885c Mon Sep 17 00:00:00 2001 From: Machiel Groeneveld <309370+machielg@users.noreply.github.com> Date: Fri, 9 Sep 2022 13:48:59 +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..8ea7a0a1d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Build Status](https://dev.azure.com/crystalline-io/ms/_apis/build/status/machielg.python-sample-vscode-flask-tutorial?branchName=master)](https://dev.azure.com/crystalline-io/ms/_build/latest?definitionId=5&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 dce0b5a412974511e45f8b6502ff72b263b3bc2e Mon Sep 17 00:00:00 2001 From: Machiel Groeneveld <309370+machielg@users.noreply.github.com> Date: Fri, 9 Sep 2022 13:57:24 +0200 Subject: [PATCH 3/4] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6f401c616..42b87e282 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -7,7 +7,7 @@ trigger: - master pool: - vmImage: ubuntu-latest + vmImage: macos-latest strategy: matrix: Python27: From 0e2fdb98fb4ce3fbad6f464f1289cc00eae4b4be Mon Sep 17 00:00:00 2001 From: Machiel Groeneveld <309370+machielg@users.noreply.github.com> Date: Fri, 9 Sep 2022 14:41:30 +0200 Subject: [PATCH 4/4] Update azure-pipelines.yml --- azure-pipelines.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 42b87e282..c6033d864 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -3,8 +3,9 @@ # 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 +pr: +- main +- features/* pool: vmImage: macos-latest