Nightly real-model tests #78
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Nightly real-model tests | |
| # PR CI stays lightweight and model-free (see ci.yml). Real-model runs — | |
| # onnxruntime + pulled artifacts — happen nightly or on demand only. | |
| on: | |
| schedule: | |
| - cron: "0 4 * * *" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| real-model: | |
| if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| with: | |
| python-version: "3.12" | |
| - name: Install (semantic extra + training deps) | |
| run: | | |
| python -m pip install -U pip | |
| # Pytest imports every collected test module before applying -k, so | |
| # install the repository's test dependencies as well as the runtime. | |
| pip install -e ".[dev,semantic]" onnx | |
| - name: Build dev artifacts (synthetic-only, offline) | |
| run: make training-dev-artifacts PY=python | |
| - name: Real-model runtime smoke (registry + calibration artifact) | |
| env: | |
| FRESHDATA_MODEL_DIR: ${{ runner.temp }}/fd-models | |
| run: | | |
| mkdir -p "$FRESHDATA_MODEL_DIR/calib-v1" | |
| cp dist/artifacts/calib-v1/calibration.json "$FRESHDATA_MODEL_DIR/calib-v1/" | |
| python -c " | |
| import freshdata as fd | |
| status = fd.models.status() | |
| assert status['calib-v1']['installed'], status | |
| print(status['calib-v1']) | |
| " | |
| - name: Semantic tests with real onnxruntime available | |
| run: pytest tests -k "semantic or models or cleanbench" -q --no-cov | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: dev-artifacts | |
| path: dist/artifacts/ | |
| retention-days: 7 |