From 85c3ba98ff577f9a5e9271fe1dd72219345757f5 Mon Sep 17 00:00:00 2001 From: Stevens Ho <71028535+stevensho11@users.noreply.github.com> Date: Sat, 5 Apr 2025 20:09:40 -0400 Subject: [PATCH 1/6] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000..374614aae --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,37 @@ +# 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: + Python38: + python.version: '3.8' + Python39: + python.version: '3.9' + Python310: + python.version: '3.10' + Python311: + python.version: '3.11' + +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 622ba2d539531384a8fbd2bc88f8f92c52e1ac6d Mon Sep 17 00:00:00 2001 From: Stevens Ho Date: Sat, 5 Apr 2025 20:16:09 -0400 Subject: [PATCH 2/6] i didn't request parallel processing so i can't run all 4 tests together, testing with 1 --- azure-pipelines.yml | 46 ++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 374614aae..a25f693d0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -4,34 +4,34 @@ # https://docs.microsoft.com/azure/devops/pipelines/languages/python trigger: -- main + - main pool: vmImage: ubuntu-latest -strategy: - matrix: - Python38: - python.version: '3.8' - Python39: - python.version: '3.9' - Python310: - python.version: '3.10' - Python311: - python.version: '3.11' +# strategy: +# matrix: +# Python38: +# python.version: '3.8' +# Python39: +# python.version: '3.9' +# Python310: +# python.version: '3.10' +# Python311: +# python.version: '3.11' steps: -- task: UsePythonVersion@0 - inputs: - versionSpec: '$(python.version)' - displayName: 'Use Python $(python.version)' + - task: UsePythonVersion@0 + inputs: + versionSpec: "3.10" + displayName: "Use Python 3.10" -- script: | - python -m pip install --upgrade pip - pip install -r requirements.txt - displayName: 'Install dependencies' + - script: | + python -m pip install --upgrade pip + pip install -r requirements.txt + displayName: "Install dependencies" -- script: | - pip install pytest pytest-azurepipelines - pytest - displayName: 'pytest' + - script: | + pip install pytest pytest-azurepipelines + pytest + displayName: "pytest" From 2203d4b5c77445130c11b3672f2203d973435b52 Mon Sep 17 00:00:00 2001 From: Stevens Ho Date: Sat, 5 Apr 2025 20:32:04 -0400 Subject: [PATCH 3/6] trying to use self-hosted agent pool --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a25f693d0..45d9965c4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -7,7 +7,7 @@ trigger: - main pool: - vmImage: ubuntu-latest + vmImage: local # strategy: # matrix: From 1565b94f42e7e33c1d1ad123d97d5e9abc4a3434 Mon Sep 17 00:00:00 2001 From: Stevens Ho Date: Sat, 5 Apr 2025 20:34:17 -0400 Subject: [PATCH 4/6] now it should use self-hosted... --- azure-pipelines.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 45d9965c4..d2b1d15d7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -7,7 +7,8 @@ trigger: - main pool: - vmImage: local + vmImage: ubuntu-latest + name: local # strategy: # matrix: From 0b282d004c035824de10646c3c7dd25b52083a8d Mon Sep 17 00:00:00 2001 From: Stevens Ho Date: Sat, 5 Apr 2025 20:39:48 -0400 Subject: [PATCH 5/6] now trying 4 different python versions --- azure-pipelines.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d2b1d15d7..21dd3830c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -10,22 +10,22 @@ pool: vmImage: ubuntu-latest name: local -# strategy: -# matrix: -# Python38: -# python.version: '3.8' -# Python39: -# python.version: '3.9' -# Python310: -# python.version: '3.10' -# Python311: -# python.version: '3.11' +strategy: + matrix: + Python38: + python.version: "3.8" + Python39: + python.version: "3.9" + Python310: + python.version: "3.10" + Python311: + python.version: "3.11" steps: - task: UsePythonVersion@0 inputs: - versionSpec: "3.10" - displayName: "Use Python 3.10" + versionSpec: "$(python.version)" + displayName: "Use Python $(python.version)" - script: | python -m pip install --upgrade pip From fec7e81c0b1fa6868735ede6c1b254c31e5f13f4 Mon Sep 17 00:00:00 2001 From: Stevens Ho Date: Sat, 5 Apr 2025 21:36:39 -0400 Subject: [PATCH 6/6] branching and testing pr validation pipeline change --- azure-pipelines.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 21dd3830c..107fb0501 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -5,6 +5,10 @@ trigger: - main + - releases/* +pr: + - main + - releases/* pool: vmImage: ubuntu-latest