0
0
mirror of https://github.com/python/cpython.git synced 2024-11-21 21:09:37 +01:00
cpython/.azure-pipelines/prebuild-checks.yml
Miss Islington (bot) a9d4f51e7e
[3.11] CI: Remove docs build from Azure Pipelines (GH-105823) (#105855)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-06-16 11:29:35 +00:00

25 lines
821 B
YAML

steps:
- checkout: self
fetchDepth: 5
- script: echo "##vso[task.setvariable variable=diffTarget]HEAD~1"
displayName: Set default diff target
- script: |
git fetch -q origin $(System.PullRequest.TargetBranch)
echo "##vso[task.setvariable variable=diffTarget]HEAD \$(git merge-base HEAD FETCH_HEAD)"
displayName: Fetch comparison tree
condition: and(succeeded(), variables['System.PullRequest.TargetBranch'])
- script: |
if ! git diff --name-only $(diffTarget) | grep -qvE '(\.rst$|^Doc|^Misc)'
then
echo "Only docs were updated: tests.run=false"
echo "##vso[task.setvariable variable=run;isOutput=true]false"
else
echo "Code was updated: tests.run=true"
echo "##vso[task.setvariable variable=run;isOutput=true]true"
fi
displayName: Detect source changes
name: tests