Skip to content

Fiddle with tests matrix. #820

Fiddle with tests matrix.

Fiddle with tests matrix. #820

Workflow file for this run

# A workflow to do PR test runs

Check failure on line 1 in .github/workflows/ci-tests.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci-tests.yml

Invalid workflow file

(Line: 29, Col: 25): Unexpected value '3.13'
#
# Reference:
# - https://github.com/actions/checkout
# - https://github.com/conda-incubator/setup-miniconda
name: ci-tests
# Triggers the workflow on pull-request or push events
on:
push:
branches:
- "main"
tags:
- "v*"
pull_request:
branches:
- "*"
workflow_dispatch:
jobs:
tests:
name: "Test session=${{ matrix.session }} Python=${{ matrix.python-version }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
session: ["tests", "doctests-docs", "doctests-api"]
python-version: "3.13"
include:
- session: "tests"
python-version: "3.10"
defaults:
run:
shell: bash -l {0}
env:
IRIS_TEST_DATA_VERSION: "2.20"
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v6
- name: "Create conda environment"
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
activate-environment: testenv
python-version: ${{ matrix.python-version }}
channels: conda-forge
show-channel-urls: true
- name: "Install dependencies"
run: |
conda install --yes numpy pytest pytest-mock iris xarray filelock requests zarr aiohttp fsspec
- name: "Install repo-under-test"
run: |
python -m pip install --no-deps --editable .
- name: "Conda info"
run: |
conda info
conda list --explicit
- name: "Fetch Iris-test-data"
run: |
wget --quiet https://github.com/SciTools/iris-test-data/archive/v${IRIS_TEST_DATA_VERSION}.zip -O iris-test-data.zip
unzip -q iris-test-data.zip
mkdir --parents ${GITHUB_WORKSPACE}/iris_test_data
mv iris-test-data-${IRIS_TEST_DATA_VERSION} ${GITHUB_WORKSPACE}/iris_test_data_download
- name: "Run tests"
if: matrix.session == 'tests'
run: |
ls ${GITHUB_WORKSPACE}/iris_test_data_download/test_data
OVERRIDE_TEST_DATA_REPOSITORY=${GITHUB_WORKSPACE}/iris_test_data_download/test_data PYTHONPATH=./tests:$PYTHONPATH pytest -v ./tests
- name: "Run doctests: Docs"
if: matrix.session == 'doctests-docs'
run: |
cd docs
pytest --doctest-glob="*.rst" --doctest-continue-on-failure
- name: "Run doctests: API"
if: matrix.session == 'doctests-api'
run: |
cd lib
pytest --doctest-modules --doctest-continue-on-failure