From 3bb1394c4d8e3e3b6958738e4267326c7ec53f9f Mon Sep 17 00:00:00 2001 From: IAM-CuriousLearner <149253874+shaliny-singh-grewal@users.noreply.github.com> Date: Thu, 9 Jan 2025 16:09:58 +0530 Subject: [PATCH 1/2] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000..7a856f49d --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,21 @@ +# Node.js +# Build a general Node.js project with npm. +# Add steps that analyze code, save build artifacts, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript + +trigger: +- main + +pool: + vmImage: ubuntu-latest + +steps: +- task: NodeTool@0 + inputs: + versionSpec: '20.x' + displayName: 'Install Node.js' + +- script: | + npm install + npm run build + displayName: 'npm install and build' From fcfd2c885318f8d1390c5a7bad48bc931de2c6a2 Mon Sep 17 00:00:00 2001 From: IAM-CuriousLearner <149253874+shaliny-singh-grewal@users.noreply.github.com> Date: Wed, 15 Jan 2025 14:22:31 +0530 Subject: [PATCH 2/2] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 50 +++++++++++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 13 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7a856f49d..a6489ab30 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,21 +1,45 @@ -# Node.js -# Build a general Node.js project with npm. -# Add steps that analyze code, save build artifacts, deploy, and more: -# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript - trigger: - main pool: vmImage: ubuntu-latest +strategy: + matrix: + Python310: + python.version: '3.10' + Python311: + python.version: '3.11' + Python312: + python.version: '3.12' + steps: -- task: NodeTool@0 - inputs: - versionSpec: '20.x' - displayName: 'Install Node.js' + - 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' + + - task: ArchiveFiles@2 + displayName: 'Archive files' + inputs: + rootFolderOrFile: $(System.DefaultWorkingDirectory) + includeRootFolder: false + archiveType: zip + archiveFile: $(Build.ArtifactStagingDirectory)/$(Build.BuildId)-$(python.version).zip + replaceExistingArchive: true + + - task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: 'drop' + publishLocation: 'Container' -- script: | - npm install - npm run build - displayName: 'npm install and build' + - script: | + pip install pytest pytest-azurepipelines + pytest + displayName: 'pytest' \ No newline at end of file