From 42e475de8f50933e8bf765e176f4ab7ab04bbe1f Mon Sep 17 00:00:00 2001 From: Machendra <52621880+Machendra@users.noreply.github.com> Date: Tue, 20 Oct 2020 10:23:59 +0530 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 0c10abd0d6ebe6cddc7836501d8333c51f32409c Mon Sep 17 00:00:00 2001 From: Machendra <52621880+Machendra@users.noreply.github.com> Date: Wed, 3 Sep 2025 16:15:13 +0530 Subject: [PATCH 2/4] Update azure-pipelines.yml --- azure-pipelines.yml | 75 +++++++++++++++++++++++++++++++++------------ 1 file changed, 56 insertions(+), 19 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7d405f9ee..136f3f2f2 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,36 +1,73 @@ -# 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: +# Python 2.7 +- task: UsePythonVersion@0 + inputs: + versionSpec: '2.7' + displayName: 'Use Python 2.7' + +- script: | + python -m pip install --upgrade pip + pip install -r requirements.txt + displayName: 'Install dependencies (Python 2.7)' + +- script: | + pip install pytest pytest-azurepipelines + pytest + displayName: 'Run tests (Python 2.7)' + + +# Python 3.5 +- task: UsePythonVersion@0 + inputs: + versionSpec: '3.5' + displayName: 'Use Python 3.5' + +- script: | + python -m pip install --upgrade pip + pip install -r requirements.txt + displayName: 'Install dependencies (Python 3.5)' + +- script: | + pip install pytest pytest-azurepipelines + pytest + displayName: 'Run tests (Python 3.5)' + + +# Python 3.6 +- task: UsePythonVersion@0 + inputs: + versionSpec: '3.6' + displayName: 'Use Python 3.6' + +- script: | + python -m pip install --upgrade pip + pip install -r requirements.txt + displayName: 'Install dependencies (Python 3.6)' + +- script: | + pip install pytest pytest-azurepipelines + pytest + displayName: 'Run tests (Python 3.6)' + + +# Python 3.7 - task: UsePythonVersion@0 inputs: - versionSpec: '$(python.version)' - displayName: 'Use Python $(python.version)' + versionSpec: '3.7' + displayName: 'Use Python 3.7' - script: | python -m pip install --upgrade pip pip install -r requirements.txt - displayName: 'Install dependencies' + displayName: 'Install dependencies (Python 3.7)' - script: | pip install pytest pytest-azurepipelines pytest - displayName: 'pytest' + displayName: 'Run tests (Python 3.7)' From bdc66f8503a7562ba96e0e645d0679e11ec3182d Mon Sep 17 00:00:00 2001 From: Machendra <52621880+Machendra@users.noreply.github.com> Date: Wed, 3 Sep 2025 16:25:59 +0530 Subject: [PATCH 3/4] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines-1.yml | 73 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 azure-pipelines-1.yml diff --git a/azure-pipelines-1.yml b/azure-pipelines-1.yml new file mode 100644 index 000000000..33cf7abc8 --- /dev/null +++ b/azure-pipelines-1.yml @@ -0,0 +1,73 @@ +trigger: +- master + +pool: + vmImage: 'ubuntu-latest' + +steps: +# Python 2.7 +- task: UsePythonVersion@0 + inputs: + versionSpec: '2.7' + displayName: 'Use Python 2.7' + +- script: | + python -m pip install --upgrade pip + pip install -r requirements.txt + displayName: 'Install dependencies (Python 2.7)' + +- script: | + pip install pytest pytest-azurepipelines + pytest + displayName: 'Run tests (Python 2.7)' + + +# Python 3.5 +- task: UsePythonVersion@0 + inputs: + versionSpec: '3.5' + displayName: 'Use Python 3.5' + +- script: | + python -m pip install --upgrade pip + pip install -r requirements.txt + displayName: 'Install dependencies (Python 3.5)' + +- script: | + pip install pytest pytest-azurepipelines + pytest + displayName: 'Run tests (Python 3.5)' + + +# Python 3.6 +- task: UsePythonVersion@0 + inputs: + versionSpec: '3.6' + displayName: 'Use Python 3.6' + +- script: | + python -m pip install --upgrade pip + pip install -r requirements.txt + displayName: 'Install dependencies (Python 3.6)' + +- script: | + pip install pytest pytest-azurepipelines + pytest + displayName: 'Run tests (Python 3.6)' + + +# Python 3.7 +- task: UsePythonVersion@0 + inputs: + versionSpec: '3.7' + displayName: 'Use Python 3.7' + +- script: | + python -m pip install --upgrade pip + pip install -r requirements.txt + displayName: 'Install dependencies (Python 3.7)' + +- script: | + pip install pytest pytest-azurepipelines + pytest + displayName: 'Run tests (Python 3.7)' \ No newline at end of file From 4265001cf90c81a0d155368c433a2b5deef384e8 Mon Sep 17 00:00:00 2001 From: Machendra <52621880+Machendra@users.noreply.github.com> Date: Wed, 3 Sep 2025 16:53:49 +0530 Subject: [PATCH 4/4] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 86 ++++++++++----------------------------------- 1 file changed, 19 insertions(+), 67 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 136f3f2f2..b297e494a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -4,70 +4,22 @@ trigger: pool: vmImage: 'ubuntu-latest' -steps: -# Python 2.7 -- task: UsePythonVersion@0 - inputs: - versionSpec: '2.7' - displayName: 'Use Python 2.7' - -- script: | - python -m pip install --upgrade pip - pip install -r requirements.txt - displayName: 'Install dependencies (Python 2.7)' - -- script: | - pip install pytest pytest-azurepipelines - pytest - displayName: 'Run tests (Python 2.7)' - - -# Python 3.5 -- task: UsePythonVersion@0 - inputs: - versionSpec: '3.5' - displayName: 'Use Python 3.5' - -- script: | - python -m pip install --upgrade pip - pip install -r requirements.txt - displayName: 'Install dependencies (Python 3.5)' - -- script: | - pip install pytest pytest-azurepipelines - pytest - displayName: 'Run tests (Python 3.5)' - - -# Python 3.6 -- task: UsePythonVersion@0 - inputs: - versionSpec: '3.6' - displayName: 'Use Python 3.6' - -- script: | - python -m pip install --upgrade pip - pip install -r requirements.txt - displayName: 'Install dependencies (Python 3.6)' - -- script: | - pip install pytest pytest-azurepipelines - pytest - displayName: 'Run tests (Python 3.6)' - - -# Python 3.7 -- task: UsePythonVersion@0 - inputs: - versionSpec: '3.7' - displayName: 'Use Python 3.7' - -- script: | - python -m pip install --upgrade pip - pip install -r requirements.txt - displayName: 'Install dependencies (Python 3.7)' - -- script: | - pip install pytest pytest-azurepipelines - pytest - displayName: 'Run tests (Python 3.7)' +stages: +- stage: Test + jobs: + - job: PythonTests # Renamed for clarity + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: '3.11' # <-- UPDATED VERSION + displayName: 'Use Python 3.11' + + - script: | + python -m pip install --upgrade pip + pip install -r requirements.txt + displayName: 'Install dependencies' + + - script: | + pip install pytest pytest-azurepipelines + pytest + displayName: 'Run tests' \ No newline at end of file