File tree 2 files changed +25
-0
lines changed 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,19 @@ commands:
24
24
git pull --ff-only upstream "refs/pull/$(cat merge.txt)/merge";
25
25
fi
26
26
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
+
27
40
apt-install :
28
41
steps :
29
42
- run :
@@ -139,6 +152,7 @@ jobs:
139
152
- image : circleci/python:3.8
140
153
steps :
141
154
- checkout
155
+ - check-skip
142
156
- merge
143
157
144
158
- 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.
219
219
220
220
.. _tox : https://tox.readthedocs.io/
221
221
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] ``
222
233
223
234
.. _pr-squashing :
224
235
You can’t perform that action at this time.
0 commit comments