Skip to content

bump beam

bump beam #1033

name: Integration tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
types: [ opened, reopened, synchronize, labeled ]
env:
PYTEST_ADDOPTS: "--color=yes"
jobs:
integration-tests:
# run on:
# - all pushes to specified branch(es)
# - a PR was just labeled 'test-integration'
# - a PR with 'test-integration' label was opened, reopened, or synchronized
if: |
github.event_name == 'push' ||
github.event.label.name == 'test-integration' ||
contains( github.event.pull_request.labels.*.name, 'test-integration')
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# the runner versions tested here are pinned to an older version of apache-beam which is not
# necessarily expected to work on python > 3.9. For one additional context point, see:
# https://github.com/pangeo-forge/pangeo-forge-recipes/issues/540#issuecomment-1685096271
# Once https://github.com/pangeo-forge/pangeo-forge-runner/pull/90 goes in, we can add back
# integration testing for 3.10 and 3.11 (for runner versions that follow that PR).
python-version: ["3.9"] # , "3.10", "3.11"]
runner-version: [
"pangeo-forge-runner==0.9.1",
"pangeo-forge-runner==0.9.2",
"pangeo-forge-runner==0.9.3",
]
steps:
- uses: actions/checkout@v4
- name: 🔁 Setup Python
id: setup-python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml
- name: Install pangeo-forge recipes and runner
shell: bash -l {0}
run: |
python -m pip install ${{ matrix.runner-version }}
python -m pip install -e ".[test,minio]"
- name: Install optional grib deps
shell: bash -l {0}
run: |
python -m pip install ecmwflibs eccodes cfgrib
- name: 'Setup minio'
run: |
wget --quiet https://dl.min.io/server/minio/release/linux-amd64/minio
chmod +x minio
mv minio /usr/local/bin/minio
minio --version
- name: 🎯 Check cache hit
run: echo '${{ steps.setup-python.outputs.cache-hit }}'
# order reversed to fix https://github.com/pangeo-forge/pangeo-forge-recipes/pull/595#issuecomment-1811630921
# this should however be fixed in the runner itself
- name: 🏄‍♂️ Run Tests
shell: bash -l {0}
run: |
pytest --timeout=600 -vvxs tests/test_integration.py --run-integration