[issue39837] Remove Azure Pipelines from GitHub PRs
STINNER Victor
report at bugs.python.org
Thu Mar 5 17:21:40 EST 2020
STINNER Victor <vstinner at python.org> added the comment:
Instead of not running the job, is it technically possible to modify the jobs to do nothing for docs only changes?
.travis.yml works like that:
before_install:
- set -e
- |
# Check short-circuit conditions
if [[ "${TESTING}" != "docs" && "${TESTING}" != "doctest" ]]
then
if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]
then
echo "Not a PR, doing full build."
else
# Pull requests are slightly complicated because $TRAVIS_COMMIT_RANGE
# may include more changes than desired if the history is convoluted.
# Instead, explicitly fetch the base branch and compare against the
# merge-base commit.
git fetch -q origin +refs/heads/$TRAVIS_BRANCH
changes=$(git diff --name-only HEAD $(git merge-base HEAD FETCH_HEAD))
echo "Files changed:"
echo "$changes"
if ! echo "$changes" | grep -qvE '(\.rst$)|(^Doc)|(^Misc)'
then
echo "Only docs were updated, stopping build process."
exit
fi
fi
fi
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39837>
_______________________________________
More information about the Python-bugs-list
mailing list