File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,19 @@ commands:
2424 git pull --ff-only upstream "refs/pull/$(cat merge.txt)/merge";
2525 fi
2626
27+ check-skip :
28+ steps :
29+ - run :
30+ name : Check-skip
31+ command : |
32+ export COMMIT_MESSAGE=$(git log --max-count=1 --skip=1 --pretty=format:"%B" | tr "\n" " ")
33+ echo "Got commit message:"
34+ echo "${COMMIT_MESSAGE}"
35+ if [[ -v CIRCLE_PULL_REQUEST ]] && ([[ "$COMMIT_MESSAGE" == *"[skip circle]"* ]] || [[ "$COMMIT_MESSAGE" == *"[circle skip]"* ]]); then
36+ echo "Skip detected, exiting job ${CIRCLE_JOB} for PR ${CIRCLE_PULL_REQUEST}."
37+ circleci-agent step halt;
38+ fi
39+
2740 apt-install :
2841 steps :
2942 - run :
@@ -139,6 +152,7 @@ jobs:
139152 - image : circleci/python:3.8
140153 steps :
141154 - checkout
155+ - check-skip
142156 - merge
143157
144158 - apt-install
Original file line number Diff line number Diff line change @@ -219,6 +219,17 @@ will run on all supported platforms and versions of Python.
219219
220220 .. _tox : https://tox.readthedocs.io/
221221
222+ * If you know your changes do not need to be tested (this is very rare!), all
223+ CIs can be skipped by including ``[ci skip] `` or ``[skip ci] `` in your
224+ commit message. If you know only a subset of CIs need to be run (e.g.,
225+ if you are changing some block of plain reStructuredText and only want
226+ only CircleCI to run to render the result), individual CIs can be skipped
227+ to save bandwidth using:
228+
229+ - GitHub Actions: ``[skip actions] ``
230+ - AppVeyor: ``[skip appveyor] ``
231+ - Azure Pipelines: ``[skip azp] ``
232+ - CircleCI: ``[skip circle] ``
222233
223234.. _pr-squashing :
224235
You can’t perform that action at this time.
0 commit comments