From 81a8058836ac30259ca570e0c912e2b385cdbc55 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Tue, 11 Jul 2023 08:22:30 +0000 Subject: [PATCH] Change parameter matrix to list instead of dict --- .azure/azure-ci-build-pipeline.yaml | 128 ++++++++++++++-------------- 1 file changed, 64 insertions(+), 64 deletions(-) diff --git a/.azure/azure-ci-build-pipeline.yaml b/.azure/azure-ci-build-pipeline.yaml index 49fd7174..de760316 100644 --- a/.azure/azure-ci-build-pipeline.yaml +++ b/.azure/azure-ci-build-pipeline.yaml @@ -11,78 +11,78 @@ parameters: - name: matrix type: object default: - UbuntuPython38: - py: '3.8' - img: 'ubuntu-latest' - only_pr: false - UbuntuPython310: - py: '3.10' - img: 'ubuntu-latest' - only_pr: true - WindowsPython38: - py: '3.8' - img: 'windows-latest' - only_pr: false - WindowsPython310: - py: '3.10' - img: 'windows-latest' - only_pr: false - MacOSPython38: - py: '3.8' - img: 'macOS-latest' - only_pr: false - MacOSPython310: - py: '3.10' - img: 'macOS-latest' - only_pr: false + - job_name: 'UbuntuPython38' + py: '3.8' + img: 'ubuntu-latest' + only_pr: false + - job_name: 'UbuntuPython310' + py: '3.10' + img: 'ubuntu-latest' + only_pr: true + - job_name: 'WindowsPython38' + py: '3.8' + img: 'windows-latest' + only_pr: false + - job_name: 'WindowsPython310' + py: '3.10' + img: 'windows-latest' + only_pr: false + - job_name: 'MacOSPython38' + py: '3.8' + img: 'macOS-latest' + only_pr: false + - job_name: 'MacOSPython310' + py: '3.10' + img: 'macOS-latest' + only_pr: false stages: - stage: Test jobs: - - ${{ each item in parameters.matrix }}: - ${{ if or(eq(variables['Build.Reason'], 'PullRequest'), item.Value.only_pr) }}: - - job: ${{ item.Key }} - pool: - vmImage: ${{ item.Value.img }} - steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: ${{ item.Value.py }} - displayName: 'Use Python ${{ item.Value.py }}' + - ${{ each item in parameters.matrix }}: + ${{ if or(eq(variables['Build.Reason'], 'PullRequest'), item.only_pr) }}: + - job: ${{ item.job_name }} + pool: + vmImage: ${{ item.img }} + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: ${{ item.py }} + displayName: 'Use Python ${{ item.py }}' - - script: | - python -m pip install pre-commit - pre-commit install - pre-commit run --all-files - displayName: 'Run pre-commits' + - script: | + python -m pip install pre-commit + pre-commit install + pre-commit run --all-files + displayName: 'Run pre-commits' - - script: | - python -m pip install --upgrade pip==23.0.1 - pip install wheel==0.38.4 --upgrade - pip install setuptools==66 --upgrade - pip install build==0.10.0 - pip install pytest-azurepipelines - displayName: 'Install build dependencies' + - script: | + python -m pip install --upgrade pip==23.0.1 + pip install wheel==0.38.4 --upgrade + pip install setuptools==66 --upgrade + pip install build==0.10.0 + pip install pytest-azurepipelines + displayName: 'Install build dependencies' - - script: | - python -m build - displayName: 'Build PrimAITE' + - script: | + python -m build + displayName: 'Build PrimAITE' - - script: | - PRIMAITE_WHEEL=$(ls ./dist/primaite*.whl) - python -m pip install $PRIMAITE_WHEEL[dev] - displayName: 'Install PrimAITE' - condition: or(eq( variables['Agent.OS'], 'Linux' ), eq( variables['Agent.OS'], 'Darwin' )) + - script: | + PRIMAITE_WHEEL=$(ls ./dist/primaite*.whl) + python -m pip install $PRIMAITE_WHEEL[dev] + displayName: 'Install PrimAITE' + condition: or(eq( variables['Agent.OS'], 'Linux' ), eq( variables['Agent.OS'], 'Darwin' )) - - script: | - forfiles /p dist\ /m *.whl /c "cmd /c python -m pip install @file[dev]" - displayName: 'Install PrimAITE' - condition: eq( variables['Agent.OS'], 'Windows_NT' ) + - script: | + forfiles /p dist\ /m *.whl /c "cmd /c python -m pip install @file[dev]" + displayName: 'Install PrimAITE' + condition: eq( variables['Agent.OS'], 'Windows_NT' ) - - script: | - primaite setup - displayName: 'Perform PrimAITE Setup' + - script: | + primaite setup + displayName: 'Perform PrimAITE Setup' - - script: | - pytest tests/ - displayName: 'Run tests' + - script: | + pytest tests/ + displayName: 'Run tests'