Skip to content

Commit 41d4149

Browse files
authored
Merge pull request matplotlib#27696 from story645/auto-tests
DOC: clean up automated tests section of workflow docs
2 parents d3144b1 + 7163557 commit 41d4149

File tree

3 files changed

+80
-40
lines changed

3 files changed

+80
-40
lines changed

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ commands:
1717
export git_log=$(git log --max-count=1 --pretty=format:"%B" | tr "\n" " ")
1818
echo "Got commit message:"
1919
echo "${git_log}"
20-
if [[ -v CIRCLE_PULL_REQUEST ]] && ([[ "$git_log" == *"[skip circle]"* ]] || [[ "$git_log" == *"[circle skip]"* ]]); then
20+
if [[ -v CIRCLE_PULL_REQUEST ]] && [[ $git_log =~ (\[skip circle\]|\[circle skip\]|\[skip doc\]|\[doc skip\]) ]]; then
2121
echo "Skip detected, exiting job ${CIRCLE_JOB} for PR ${CIRCLE_PULL_REQUEST}."
2222
circleci-agent step halt;
2323
fi

doc/devel/coding_guide.rst

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ consistency, and maintainability of the code base.
1313
If adding new features, changing behavior or function signatures, or removing
1414
public interfaces, please consult the :ref:`api_changes`.
1515

16+
.. _code-style:
17+
1618
PEP8, as enforced by flake8
1719
===========================
1820

doc/devel/development_workflow.rst

+77-39
Original file line numberDiff line numberDiff line change
@@ -452,48 +452,86 @@ Automated tests
452452
Whenever a pull request is created or updated, various automated test tools
453453
will run on all supported platforms and versions of Python.
454454

455-
* Make sure the Linting, GitHub Actions, AppVeyor, CircleCI, and Azure
456-
pipelines are passing before merging (All checks are listed at the bottom of
457-
the GitHub page of your pull request). Here are some tips for finding the
458-
cause of the test failure:
459-
460-
- If *Linting* fails, you have a code style issue, which will be listed
461-
as annotations on the pull request's diff.
462-
- If *Mypy* or *Stubtest* fails, you have inconsistency in type hints, which
463-
will be listed as annotations in the diff.
464-
- If a GitHub Actions or AppVeyor run fails, search the log for ``FAILURES``.
465-
The subsequent section will contain information on the failed tests.
466-
- If CircleCI fails, likely you have some reStructuredText style issue in
467-
the docs. Search the CircleCI log for ``WARNING``.
468-
- If Azure pipelines fail with an image comparison error, you can find the
469-
images as *artifacts* of the Azure job:
470-
471-
- Click *Details* on the check on the GitHub PR page.
472-
- Click *View more details on Azure Pipelines* to go to Azure.
473-
- On the overview page *artifacts* are listed in the section *Related*.
474-
475-
476-
* Codecov and CodeQL are currently for information only. Their failure is not
477-
necessarily a blocker.
478-
479455
* tox_ is not used in the automated testing. It is supported for testing
480456
locally.
481457

482458
.. _tox: https://tox.readthedocs.io/
483459

484-
* If you know only a subset of CIs need to be run, this can be controlled on
485-
individual commits by including the following substrings in commit messages:
486-
487-
- ``[ci doc]``: restrict the CI to documentation checks. For when you only
488-
changed documentation (this skip is automatic if the changes are only under
489-
``doc/`` or ``galleries/``).
490-
- ``[skip circle]``: skip the documentation build check. For when you didn't
491-
change documentation.
492-
- Unit tests can be turned off for individual platforms with
493-
494-
- ``[skip actions]``: GitHub Actions
495-
- ``[skip appveyor]`` (must be in the first line of the commit): AppVeyor
496-
- ``[skip azp]``: Azure Pipelines
460+
* Codecov and CodeQL are currently for information only. Their failure is not
461+
necessarily a blocker.
497462

498-
- ``[skip ci]``: skip all CIs. Use this only if you know your changes do not
499-
need to be tested at all, which is very rare.
463+
Make sure the Linting, GitHub Actions, AppVeyor, CircleCI, and Azure pipelines are
464+
passing before merging. All checks are listed at the bottom of the GitHub page of your
465+
pull request.
466+
467+
.. list-table::
468+
:header-rows: 1
469+
:stub-columns: 1
470+
:widths: 20 20 60
471+
472+
* - Name
473+
- Check
474+
- Tips for finding cause of failure
475+
* - Linting
476+
- :ref:`code style <code-style>`
477+
- Errors are displayed as annotations on the pull request diff.
478+
* - | Mypy
479+
| Stubtest
480+
- :ref:`static type hints <type-hints>`
481+
- Errors are displayed as annotations on the pull request diff.
482+
* - CircleCI
483+
- :ref:`documentation build <writing-rest-pages>`
484+
- Search the CircleCI log for ``WARNING``.
485+
* - | GitHub Actions
486+
| AppVeyor
487+
| Azure pipelines
488+
- :ref:`tests <testing>`
489+
- | Search the log for ``FAILURES``. Subsequent section should contain information
490+
on failed tests.
491+
|
492+
| On Azure, find the images as *artifacts* of the Azure job:
493+
| 1. Click *Details* on the check on the GitHub PR page.
494+
| 2. Click *View more details on Azure Pipelines* to go to Azure.
495+
| 3. On the overview page *artifacts* are listed in the section *Related*.
496+
497+
Skip CI checks
498+
--------------
499+
500+
If you know only a subset of CI checks need to be run, you can skip unneeded CI checks
501+
on individual commits by including the following strings in the commit message:
502+
503+
.. list-table::
504+
:header-rows: 1
505+
:stub-columns: 1
506+
:widths: 25 20 55
507+
508+
* - String
509+
- Effect
510+
- Notes
511+
* - ``[ci doc]``
512+
- Only run documentation checks.
513+
- | For when you have only changed documentation.
514+
| ``[ci doc]`` is applied automatically when the changes are only to files in
515+
``doc/**/`` or ``galleries/**/``
516+
* - ``[skip doc]``
517+
- Skip documentation checks.
518+
- For when you didn't change documentation.
519+
* - ``[skip appveyor]``
520+
- Skip AppVeyor run.
521+
- Substring must be in first line of commit message.
522+
* - ``[skip azp]``
523+
- Skip Azure Pipelines.
524+
-
525+
* - ``[skip actions]``
526+
- Skip GitHub Actions.
527+
-
528+
* - ``[skip ci]``
529+
- Skip all CI checks.
530+
- Use only for changes where documentation checks and unit tests do not apply.
531+
532+
533+
``[skip actions]`` and ``[skip ci]`` only skip Github Actions CI workflows that are
534+
triggered on ``on: push`` and ``on: pull_request`` events. For more information,
535+
see `Skipping workflow runs`_.
536+
537+
.. _`Skipping workflow runs`: https://docs.github.com/en/actions/managing-workflow-runs/skipping-workflow-runs

0 commit comments

Comments
 (0)