diff --git a/azure-pipelines-1.yml b/azure-pipelines-1.yml new file mode 100644 index 000000000..b8ed8b50b --- /dev/null +++ b/azure-pipelines-1.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: agent01 +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' diff --git a/azure-pipelines-2.yml b/azure-pipelines-2.yml new file mode 100644 index 000000000..9ec2cffd1 --- /dev/null +++ b/azure-pipelines-2.yml @@ -0,0 +1,43 @@ +# 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: + name: Default +strategy: + matrix: + Python38: + python.version: '3.8' +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' +- task: PythonScript@0 + inputs: + scriptSource: 'inline' + script: | + print('Hello world 1') +- script: | + echo "Variable1: $(Variable1)" + echo "Variable2: $(Variable2)" + echo "SecretVariable: ***********" + + # Unmask the secret variable + echo "SecretVariable: $SECRET_VARIABLE" + displayName: 'Print Runtime Variables' + diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000..4035e9be6 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,29 @@ +# 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: + name: Default +strategy: + matrix: + Python36: + python.version: '3.6' +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'