Download .github/workflows/observability.yml from build-small-hackathon/Forager-Field-Notes: direct link, hf CLI and curl.
- Browser
- Download file 1.77 kB
-
https://huggingface.co/spaces/build-small-hackathon/Forager-Field-Notes/resolve/refs%2Fpr%2F2/.github/workflows/observability.yml
- Command line
-
hf download hf://spaces/build-small-hackathon/Forager-Field-Notes@refs/pr/2/.github/workflows/observability.yml
-
curl -L -o observability.yml https://huggingface.co/spaces/build-small-hackathon/Forager-Field-Notes/resolve/refs%2Fpr%2F2/.github/workflows/observability.yml
1.77 kB
| name: observability | |
| on: | |
| push: | |
| paths: | |
| - "observability/**" | |
| - "pipeline/**" | |
| - ".github/workflows/observability.yml" | |
| pull_request: | |
| paths: | |
| - "observability/**" | |
| - "pipeline/**" | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_PASSWORD: forager | |
| POSTGRES_DB: forager_fs_obs | |
| ports: | |
| - 5434:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U postgres" | |
| --health-interval 2s | |
| --health-timeout 5s | |
| --health-retries 15 | |
| env: | |
| FORAGER_OBS_DSN: postgresql://postgres:forager@localhost:5434/forager_fs_obs | |
| steps: | |
| # Two checkouts side by side, because observability/requirements.txt | |
| # installs the shared package as `-e ../forager-obs`. Actions cannot check | |
| # out above the workspace, so this repo goes in a subdirectory too and the | |
| # later steps set working-directory. | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: forager-field-station | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: thefullnacho/forager-obs | |
| path: forager-obs | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - name: Install deps (incl. editable forager-obs) | |
| working-directory: forager-field-station | |
| run: pip install -r observability/requirements.txt | |
| - name: Shared safety rules (no DB, no models) | |
| working-directory: forager-obs | |
| run: python -m pytest -q | |
| - name: Two-photo safety tests + observability schema/views | |
| working-directory: forager-field-station | |
| run: | | |
| python -m pytest observability/tests/ tests/test_two_photo.py -q | |