Skip to content
Merged
Show file tree
Hide file tree
Changes from 14 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
198 changes: 0 additions & 198 deletions .cirrus.yml

This file was deleted.

83 changes: 83 additions & 0 deletions .github/workflows/ci-docs-linkcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# 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:
- "*"
pull_request:
branches:
- "*"

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: 0
cache_period: ${{ env.CACHE_PERIOD }}

- 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: 0
cache_period: ${{ env.CACHE_PERIOD }}
install_packages: "nox pip"

- name: "conda info"
run: |
conda info
conda list

- name: "nox cache"
uses: ./.github/workflows/composite/nox-cache
with:
cache_build: 0
lock_file: ${{ env.LOCK_FILE }}

- name: "iris linkcheck"
env:
PY_VER: ${{ matrix.python-version }}
run: |
nox --session linkcheck -- --verbose
114 changes: 114 additions & 0 deletions .github/workflows/ci-docs-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# reference:
# - https://github.com/actions/cache
# - https://github.com/actions/checkout
# - https://github.com/marketplace/actions/setup-miniconda

name: ci-docs-tests

on:
push:
branches:
- "*"
pull_request:
branches:
- "*"

jobs:
tests:
name: "doctests ${{ 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:
IRIS_TEST_DATA_VERSION: "2.9"
ENV_NAME: "ci-docs-tests"

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: "data cache"
uses: ./.github/workflows/composite/iris-data-cache
with:
cache_build: 0
version: ${{ env.IRIS_TEST_DATA_VERSION }}

- name: "conda package cache"
uses: ./.github/workflows/composite/conda-pkg-cache
with:
cache_build: 0
cache_period: ${{ env.CACHE_PERIOD }}

- 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: 0
cache_period: ${{ env.CACHE_PERIOD }}
install_packages: "cartopy nox pip"

- name: "conda info"
run: |
conda info
conda list

- name: "cartopy cache"
uses: ./.github/workflows/composite/cartopy-cache
with:
cache_build: 0
cache_period: ${{ env.CACHE_PERIOD }}

- name: "nox cache"
uses: ./.github/workflows/composite/nox-cache
with:
cache_build: 0
lock_file: ${{ env.LOCK_FILE }}

# TODO: drop use of site.cfg and explicit use of mplrc
- name: "iris configure"
env:
SITE_CFG: lib/iris/etc/site.cfg
MPL_RC: ${HOME}/.config/matplotlib/matplotlibrc
run: |
mkdir -p $(dirname ${SITE_CFG})
echo ${SITE_CFG}
echo "[Resources]" >> ${SITE_CFG}
echo "test_data_dir = ${HOME}/iris-test-data/test_data" >> ${SITE_CFG}
echo "doc_dir = ${GITHUB_WORKSPACE}/docs" >> ${SITE_CFG}
cat ${SITE_CFG}
mkdir -p $(dirname ${MPL_RC})
echo ${MPL_RC}
echo "backend : agg" >> ${MPL_RC}
echo "image.cmap : viridis" >> ${MPL_RC}
cat ${MPL_RC}

- name: "iris doctests and gallery"
env:
PY_VER: ${{ matrix.python-version }}
run: |
nox --session doctest -- --verbose
Loading