-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (51 loc) · 1.94 KB
/
Copy pathtests.yml
File metadata and controls
63 lines (51 loc) · 1.94 KB
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
name: Tests
on:
push:
branches: [ main, dev ]
pull_request:
workflow_dispatch:
jobs:
pytest:
# Lightweight test suite -- no tensorflow. Runs everything that doesn't
# need the model itself; the tensorflow-only tests (test_model.py) are
# auto-skipped here via importorskip and exercised in the model-smoke job.
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
# Network-dependent tests (live calls to USGS / NRCS APIs) are deselected
# here to keep CI deterministic; run them locally with `pytest -m network`.
- name: Run tests
run: python -m pytest -v -m "not network"
model-smoke:
# Exercises the Phase 3 encoder-decoder model in the core training env
# (tensorflow installed). Builds the model, fits one step, predicts for
# an "unseen station" via basin fallback. This is the layer that catches
# the val_loss-explosion class of model-architecture regression that
# broke the old training pipeline.
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install core training dependencies
run: |
python -m pip install --upgrade pip
pip install -r openFlowML/requirements.txt
pip install pytest
- name: Import training pipeline (smoke)
working-directory: openFlowML
run: python -c "import combine_data, normalize_data, windowing, model, train, baselines; print('training pipeline imports OK')"
- name: Run model + windowing tests
run: python -m pytest -v tests/test_model.py tests/test_windowing.py