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