-
Notifications
You must be signed in to change notification settings - Fork 54
76 lines (66 loc) · 2.59 KB
/
test-integration.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
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