diff --git a/.github/workflows/ci-docs-linkcheck.yml b/.github/workflows/ci-docs-linkcheck.yml deleted file mode 100644 index 2fc5722d7f..0000000000 --- a/.github/workflows/ci-docs-linkcheck.yml +++ /dev/null @@ -1,94 +0,0 @@ -# reference: -# - https://github.com/actions/cache -# - https://github.com/actions/checkout -# - https://github.com/marketplace/actions/setup-miniconda - -name: ci-docs-linkcheck - -on: - push: - branches: - - "main" - - "v*x" - tags: - - "v*" - pull_request: - branches: - - "*" - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - tests: - name: "linkcheck ${{ matrix.os }} ${{ matrix.python-version }}" - - runs-on: ${{ matrix.os }} - - defaults: - run: - shell: bash -l {0} - - strategy: - matrix: - os: ["ubuntu-latest"] - python-version: ["3.8"] - - env: - ENV_NAME: "ci-docs-linkcheck" - - steps: - - name: "checkout" - uses: actions/checkout@v3 - - - name: "environment configure" - env: - # Maximum cache period (in weeks) before forcing a cache refresh. - CACHE_WEEKS: 2 - run: | - echo "CACHE_PERIOD=$(date +%Y).$(expr $(date +%U) / ${CACHE_WEEKS})" >> ${GITHUB_ENV} - echo "LOCK_FILE=requirements/ci/nox.lock/py$(echo ${{ matrix.python-version }} | tr -d '.')-linux-64.lock" >> ${GITHUB_ENV} - - - name: "conda package cache" - uses: ./.github/workflows/composite/conda-pkg-cache - with: - cache_build: 1 - cache_period: ${{ env.CACHE_PERIOD }} - env_name: ${{ env.ENV_NAME }} - - - name: "conda install" - uses: conda-incubator/setup-miniconda@v2 - with: - miniforge-version: latest - channels: conda-forge,defaults - activate-environment: ${{ env.ENV_NAME }} - auto-update-conda: false - use-only-tar-bz2: true - - - name: "conda environment cache" - uses: ./.github/workflows/composite/conda-env-cache - with: - cache_build: 1 - cache_period: ${{ env.CACHE_PERIOD }} - env_name: ${{ env.ENV_NAME }} - install_packages: "nox pip" - - - name: "conda info" - run: | - conda info - conda list - - - name: "nox cache" - uses: ./.github/workflows/composite/nox-cache - with: - cache_build: 1 - env_name: ${{ env.ENV_NAME }} - lock_file: ${{ env.LOCK_FILE }} - - - name: "iris linkcheck" - env: - PY_VER: ${{ matrix.python-version }} - run: | - nox --session linkcheck -- --verbose diff --git a/.github/workflows/ci-docs-tests.yml b/.github/workflows/ci-docs-tests.yml index 91366f4a06..2b8b66b4ff 100644 --- a/.github/workflows/ci-docs-tests.yml +++ b/.github/workflows/ci-docs-tests.yml @@ -23,7 +23,7 @@ concurrency: jobs: tests: - name: "doctests ${{ matrix.os }} ${{ matrix.python-version }}" + name: "${{ matrix.session }} ${{ matrix.os }} py${{ matrix.python-version }}" runs-on: ${{ matrix.os }} @@ -32,9 +32,11 @@ jobs: shell: bash -l {0} strategy: + fail-fast: false matrix: os: ["ubuntu-latest"] python-version: ["3.8"] + session: ["doctest", "gallery", "linkcheck"] env: IRIS_TEST_DATA_VERSION: "2.9" @@ -120,8 +122,8 @@ jobs: echo "image.cmap : viridis" >> ${MPL_RC} cat ${MPL_RC} - - name: "iris doctests and gallery" + - name: "iris ${{ matrix.session }}" env: PY_VER: ${{ matrix.python-version }} run: | - nox --session doctest -- --verbose + nox --session ${{ matrix.session }} -- --verbose diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 5598ce1084..2863b45038 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -23,7 +23,7 @@ concurrency: jobs: tests: - name: "tests ${{ matrix.os }} ${{ matrix.python-version }}" + name: "${{ matrix.session }} ${{ matrix.os }} py${{ matrix.python-version }}" runs-on: ${{ matrix.os }} @@ -36,6 +36,7 @@ jobs: matrix: os: ["ubuntu-latest"] python-version: ["3.8"] + session: ["tests"] env: IRIS_TEST_DATA_VERSION: "2.9" @@ -115,8 +116,8 @@ jobs: echo "doc_dir = ${GITHUB_WORKSPACE}/docs" >> ${SITE_CFG} cat ${SITE_CFG} - - name: "iris tests" + - name: "iris ${{ matrix.session }}" env: PY_VER: ${{ matrix.python-version }} run: | - nox --session tests -- --verbose + nox --session ${{ matrix.session }} -- --verbose diff --git a/.github/workflows/composite/nox-cache/action.yml b/.github/workflows/composite/nox-cache/action.yml index 9d92ad7226..468dd22d81 100644 --- a/.github/workflows/composite/nox-cache/action.yml +++ b/.github/workflows/composite/nox-cache/action.yml @@ -19,4 +19,4 @@ runs: - uses: actions/cache@v3 with: path: ${{ github.workspace }}/.nox - key: ${{ runner.os }}-nox-${{ inputs.env_name }}-py${{ matrix.python-version }}-b${{ inputs.cache_build }}-${{ hashFiles(inputs.lock_file) }} + key: ${{ runner.os }}-nox-${{ inputs.env_name }}-s${{ matrix.session }}-py${{ matrix.python-version }}-b${{ inputs.cache_build }}-${{ hashFiles(inputs.lock_file) }} diff --git a/README.md b/README.md index 686a4558c6..1217cd9b38 100644 --- a/README.md +++ b/README.md @@ -16,9 +16,6 @@ ci-docs-tests - -ci-docs-linkcheck Documentation Status diff --git a/noxfile.py b/noxfile.py index 5838ea5fab..2b1df8fb00 100755 --- a/noxfile.py +++ b/noxfile.py @@ -220,7 +220,22 @@ def doctest(session: nox.sessions.Session): "doctest", external=True, ) - session.cd("..") + + +@nox.session(python=_PY_VERSION_DOCSBUILD, 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.env.update(ENV) session.run( "python", "-m",