Skip to content

Save errors util

Save errors util #255

Workflow file for this run

# A workflow to do PR test runs
#
# 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: [pull_request, push]
jobs:
tests:
name: "Test Python ${{ matrix.version }}"
runs-on: ubuntu-latest
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@v4
- name: "Create conda environment"
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
activate-environment: testenv
python-version: ${{ matrix.version }}
channels: conda-forge
show-channel-urls: true
- name: "Install dependencies"
run: |
conda install --yes pytest iris xarray filelock requests
- name: "Install *latest* Iris"
run: |
git clone https://github.com/SciTools/iris.git ./iris
cd iris
pip install -e .
cd ..
- 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"
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