|
1 | | -# Derived from the default YAML generated by Azure DevOps for a Python package |
2 | | -# Create and test a Python package on multiple Python versions. |
3 | | -# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more: |
4 | | -# https://docs.microsoft.com/azure/devops/pipelines/languages/python |
| 1 | +# PR gate and branch CI for the msal Python package. |
| 2 | +# Runs on pushes to dev/azure-pipelines and on all pull requests. |
| 3 | +# Delegates all stages to .Pipelines/template-pipeline-stages.yml with |
| 4 | +# runPublish: false — PreBuildCheck (SDL scans) + CI (test matrix) only. |
5 | 5 |
|
6 | 6 | trigger: |
7 | 7 | - dev |
8 | 8 | - azure-pipelines |
9 | 9 |
|
10 | | -pool: |
11 | | - vmImage: ubuntu-latest |
12 | | -strategy: |
13 | | - matrix: |
14 | | - Python39: |
15 | | - python.version: '3.9' |
16 | | - Python310: |
17 | | - python.version: '3.10' |
18 | | - Python311: |
19 | | - python.version: '3.11' |
20 | | - Python312: |
21 | | - python.version: '3.12' |
22 | | - Python313: |
23 | | - python.version: '3.13' |
24 | | - Python314: |
25 | | - python.version: '3.14' |
| 10 | +pr: |
| 11 | + branches: |
| 12 | + include: |
| 13 | + - '*' |
26 | 14 |
|
27 | | -steps: |
28 | | -- task: UsePythonVersion@0 |
29 | | - inputs: |
30 | | - versionSpec: '$(python.version)' |
31 | | - displayName: 'Use Python $(python.version)' |
32 | | - |
33 | | -- script: | |
34 | | - python -m pip install --upgrade pip |
35 | | - pip install -r requirements.txt |
36 | | - displayName: 'Install dependencies' |
37 | | - |
38 | | -- script: | |
39 | | - pip install pytest pytest-azurepipelines |
40 | | - mkdir -p test-results |
41 | | - set -o pipefail |
42 | | - pytest -vv --junitxml=test-results/junit.xml 2>&1 | tee test-results/pytest.log |
43 | | - displayName: 'pytest (verbose + junit + log)' |
44 | | - |
45 | | -- task: PublishTestResults@2 |
46 | | - displayName: 'Publish test results' |
47 | | - condition: succeededOrFailed() |
48 | | - inputs: |
49 | | - testResultsFormat: 'JUnit' |
50 | | - testResultsFiles: 'test-results/junit.xml' |
51 | | - failTaskOnFailedTests: true |
52 | | - testRunTitle: 'Python $(python.version) pytest' |
53 | | - |
54 | | -- task: PublishPipelineArtifact@1 |
55 | | - displayName: 'Publish pytest log artifact' |
56 | | - condition: succeededOrFailed() |
57 | | - inputs: |
58 | | - targetPath: 'test-results' |
59 | | - artifact: 'pytest-logs-$(python.version)' |
| 15 | +stages: |
| 16 | +- template: .Pipelines/template-pipeline-stages.yml |
| 17 | + parameters: |
| 18 | + runPublish: false |
0 commit comments