diff --git a/README.md b/README.md index 068a76fd5..a6968a200 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +[![Build Status](https://dev.azure.com/ajtestorg01/myproject/_apis/build/status%2Fethbatch.python-sample-vscode-flask-tutorial?branchName=main)](https://dev.azure.com/ajtestorg01/myproject/_build/latest?definitionId=2&branchName=main) # 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. diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000..33829ee7e --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,54 @@ +# 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 +pr: +- pr + +pool: + name: Default + vmImage: ubuntu-latest +strategy: + matrix: + Python37: + python.version: '3.7' + +steps: +- script: | + dir d:\learningsupport\ + displayName: 'Show me the folder' + +- task: PowerShell@2 + inputs: + targetType: 'inline' + script: | + # Write your PowerShell commands here. + + Write-Host "Hello World" + Write-Host $env:MYNAME + displayName: 'Powershell run' +- 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: | + python --version + displayName: 'Python version' + +- script: | + pip install pytest pytest-azurepipelines + pytest + displayName: 'pytest'