mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
Only run CI checks when appropriate files have changed (#74)
Closes python/core-workflow#14
This commit is contained in:
parent
22ba52b843
commit
157c0b86b8
1 changed files with 27 additions and 9 deletions
36
.travis.yml
36
.travis.yml
|
@ -30,8 +30,14 @@ matrix:
|
||||||
env:
|
env:
|
||||||
- TESTING=docs
|
- TESTING=docs
|
||||||
before_script:
|
before_script:
|
||||||
- cd Doc
|
- |
|
||||||
- make venv PYTHON=python3
|
if git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '^Doc/'
|
||||||
|
then
|
||||||
|
echo "Docs weren't updated, stopping build process."
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
cd Doc
|
||||||
|
make venv PYTHON=python3
|
||||||
script:
|
script:
|
||||||
- make html SPHINXBUILD="./venv/bin/python3 -m sphinx" SPHINXOPTS="-q"
|
- make html SPHINXBUILD="./venv/bin/python3 -m sphinx" SPHINXOPTS="-q"
|
||||||
- python3 tools/rstlint.py -i tools -i venv
|
- python3 tools/rstlint.py -i tools -i venv
|
||||||
|
@ -41,11 +47,17 @@ matrix:
|
||||||
env:
|
env:
|
||||||
- TESTING=coverage
|
- TESTING=coverage
|
||||||
before_script:
|
before_script:
|
||||||
- ./configure
|
- |
|
||||||
- make -s -j4
|
if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.(rst|yml)$)|(^Doc)/'
|
||||||
# Need a venv that can parse covered code.
|
then
|
||||||
- ./python -m venv venv
|
echo "Only docs were updated, stopping build process."
|
||||||
- ./venv/bin/python -m pip install -U coverage
|
exit
|
||||||
|
fi
|
||||||
|
./configure
|
||||||
|
make -s -j4
|
||||||
|
# Need a venv that can parse covered code.
|
||||||
|
./python -m venv venv
|
||||||
|
./venv/bin/python -m pip install -U coverage
|
||||||
script:
|
script:
|
||||||
# Skip tests that re-run the entire test suite.
|
# Skip tests that re-run the entire test suite.
|
||||||
- ./venv/bin/python -m coverage run --pylib -m test -uall -x test_multiprocessing_fork -x test_multiprocessing_forkserver -x test_multiprocessing_spawn
|
- ./venv/bin/python -m coverage run --pylib -m test -uall -x test_multiprocessing_fork -x test_multiprocessing_forkserver -x test_multiprocessing_spawn
|
||||||
|
@ -65,8 +77,14 @@ matrix:
|
||||||
|
|
||||||
# Travis provides only 2 cores, so don't overdue the parallelism and waste memory.
|
# Travis provides only 2 cores, so don't overdue the parallelism and waste memory.
|
||||||
before_script:
|
before_script:
|
||||||
- ./configure --with-pydebug
|
- |
|
||||||
- make -j4
|
if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.(rst|yml)$)|(^Doc)/'
|
||||||
|
then
|
||||||
|
echo "Only docs were updated, stopping build process."
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
./configure --with-pydebug
|
||||||
|
make -j4
|
||||||
|
|
||||||
script:
|
script:
|
||||||
# `-r -w` implicitly provided through `make buildbottest`.
|
# `-r -w` implicitly provided through `make buildbottest`.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue