Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 4 additions & 24 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ env:
# Skip specific tasks by name. Set to a non-empty string to skip.
SKIP_LINT_TASK: ""
SKIP_TEST_TASK: ""
SKIP_GALLERY_TASK: ""
SKIP_DOCTEST_TASK: ""
SKIP_LINKCHECK_TASK: ""
# Skip task groups by type. Set to a non-empty string to skip.
Expand Down Expand Up @@ -154,26 +153,7 @@ test_task:


#
# Testing Documentation Gallery (Linux)
#
gallery_task:
only_if: ${SKIP_GALLERY_TASK} == "" && ${SKIP_ALL_DOC_TASKS} == ""
<< : *CREDITS_TEMPLATE
env:
PY_VER: 3.8
name: "${CIRRUS_OS}: py${PY_VER} doc tests (gallery)"
<< : *IRIS_TEST_DATA_TEMPLATE
<< : *LINUX_TASK_TEMPLATE
tests_script:
- export CONDA_OVERRIDE_LINUX="$(uname -r | cut -d'+' -f1)"
- echo "[Resources]" > ${SITE_CFG}
- echo "test_data_dir = ${IRIS_TEST_DATA_DIR}/test_data" >> ${SITE_CFG}
- echo "doc_dir = ${CIRRUS_WORKING_DIR}/docs" >> ${SITE_CFG}
- nox --session gallery -- --verbose


#
# Testing Documentation (Linux)
# Documentation Testing and Gallery (Linux)
#
doctest_task:
only_if: ${SKIP_DOCTEST_TASK} == "" && ${SKIP_ALL_DOC_TASKS} == ""
Expand All @@ -182,7 +162,7 @@ doctest_task:
PY_VER: 3.8
MPL_RC_DIR: ${HOME}/.config/matplotlib
MPL_RC_FILE: ${HOME}/.config/matplotlib/matplotlibrc
name: "${CIRRUS_OS}: py${PY_VER} doc tests"
name: "${CIRRUS_OS}: py${PY_VER} doctests and gallery"
<< : *IRIS_TEST_DATA_TEMPLATE
<< : *LINUX_TASK_TEMPLATE
tests_script:
Expand All @@ -197,7 +177,7 @@ doctest_task:


#
# Testing Documentation Link Check (Linux)
# Documentation Link Check (Linux)
#
linkcheck_task:
only_if: ${SKIP_LINKCHECK_TASK} == "" && ${SKIP_ALL_DOC_TASKS} == ""
Expand All @@ -206,7 +186,7 @@ linkcheck_task:
PY_VER: 3.8
MPL_RC_DIR: ${HOME}/.config/matplotlib
MPL_RC_FILE: ${HOME}/.config/matplotlib/matplotlibrc
name: "${CIRRUS_OS}: py${PY_VER} doc link check"
name: "${CIRRUS_OS}: py${PY_VER} link check"
<< : *LINUX_TASK_TEMPLATE
tests_script:
- export CONDA_OVERRIDE_LINUX="$(uname -r | cut -d'+' -f1)"
Expand Down
7 changes: 7 additions & 0 deletions docs/src/whatsnew/latest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,13 @@ This document explains the changes made to Iris for this release
#. `@bjlittle`_ consolidated `nox`_ ``black``, ``flake8`` and ``isort`` sessions
into one ``lint`` session using ``pre-commit``. (:pull:`4181`)

#. `@bjlittle`_ streamlined the `cirrus-ci`_ testing by removing the ``minimal``
tests, which are a subset of the ``full`` tests. (:pull:`4218`)

#. `@bjlittle`_ consolidated the `cirrus-ci`_ documentation ``doctest`` and
``gallery`` tasks into a single task and associated `nox`_ session.
(:pull:`4219`)

.. comment
Whatsnew author names (@github name) in alphabetical order. Note that,
core dev names are automatically included by the common_links.inc:
Expand Down
30 changes: 8 additions & 22 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,31 +197,10 @@ def tests(session: nox.sessions.Session):
)


@nox.session(python=PY_VER, venv_backend="conda")
def gallery(session: nox.sessions.Session):
"""
Perform iris gallery doc-tests.

Parameters
----------
session: object
A `nox.sessions.Session` object.

"""
prepare_venv(session)
session.install("--no-deps", "--editable", ".")
session.run(
"python",
"-m",
"iris.tests.runner",
"--gallery-tests",
)


@nox.session(python=PY_VER, venv_backend="conda")
def doctest(session: nox.sessions.Session):
"""
Perform iris doc-tests.
Perform iris doctests and gallery.

Parameters
----------
Expand All @@ -243,6 +222,13 @@ def doctest(session: nox.sessions.Session):
"doctest",
external=True,
)
session.cd("..")
session.run(
"python",
"-m",
"iris.tests.runner",
"--gallery-tests",
)


@nox.session(python=PY_VER, venv_backend="conda")
Expand Down