Honest skip for python-onvif-zeep WSDL/XSD gaps in ANALYTICS-* tests #17
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: ci | |
| on: | |
| push: | |
| branches: [master, main] | |
| pull_request: | |
| branches: [master, main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| unit: | |
| name: parser + registry unit tests | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ['3.10', '3.11', '3.12', '3.13'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| - name: Install package + deps | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e . | |
| - name: Run unit tests | |
| run: pytest tests/ -v | |
| - name: Catalog sanity | |
| shell: python | |
| run: | | |
| import json, subprocess, sys | |
| subprocess.run(["onvif-tt", "corpus", "stats"], check=True) | |
| out = subprocess.check_output( | |
| ["onvif-tt", "list", "--format", "json", "--compact"] | |
| ) | |
| entries = json.loads(out) | |
| assert len(entries) > 1000, f"catalog only has {len(entries)} entries" | |
| print(f"catalog OK ({len(entries)} entries)") | |
| integration: | |
| name: end-to-end against onvif_simple_server | |
| runs-on: ubuntu-latest | |
| # Builds the upstream roleoroleo/onvif_simple_server (GPLv3) — the | |
| # same ONVIF stack OpenIPC firmware ships — and runs onvif-tt | |
| # against it. No external mirrors; everything is fetched from | |
| # GitHub (the upstream source) and Ubuntu's package archive. | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| cache: pip | |
| - name: Install onvif-tt | |
| run: pip install -e . | |
| - name: Build & launch onvif_simple_server DUT | |
| run: ci/dut/build-and-run.sh | |
| - name: Wait for the ONVIF SOAP endpoint | |
| run: | | |
| set +e | |
| OK=0 | |
| for i in $(seq 1 20); do | |
| BODY=$(curl -sS --max-time 2 \ | |
| -X POST -H 'Content-Type: application/soap+xml' \ | |
| --data '<?xml version="1.0"?><s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope"><s:Body><GetSystemDateAndTime xmlns="http://www.onvif.org/ver10/device/wsdl"/></s:Body></s:Envelope>' \ | |
| http://127.0.0.1:8080/onvif/device_service 2>&1) | |
| if echo "$BODY" | grep -q 'GetSystemDateAndTimeResponse'; then | |
| echo "DUT responding" | |
| OK=1 | |
| break | |
| fi | |
| sleep 1 | |
| done | |
| if [ "$OK" = "0" ]; then | |
| echo "=== DUT did not come up ===" | |
| echo "=== curl last body ===" | |
| echo "$BODY" | head -30 | |
| echo "=== /tmp/dut tree ===" | |
| ls -la /tmp/dut /tmp/dut/bin /tmp/dut/www/onvif 2>/dev/null || true | |
| echo "=== lighttpd.err ===" | |
| tail -80 /tmp/dut/lighttpd.err 2>/dev/null || true | |
| echo "=== wsd.log ===" | |
| tail -80 /tmp/dut/wsd.log 2>/dev/null || true | |
| echo "=== direct CGI invocation ===" | |
| REQUEST_METHOD=POST SCRIPT_NAME=/onvif/device_service \ | |
| QUERY_STRING= CONTENT_LENGTH=0 \ | |
| /tmp/dut/bin/onvif_simple_server </dev/null 2>&1 | head -40 || true | |
| exit 1 | |
| fi | |
| - name: Run onvif-tt against 127.0.0.1:8080 | |
| run: | | |
| # Narrow allowlist to start: only the core read-only tests we | |
| # expect to pass against onvif_simple_server. Streaming / | |
| # ffprobe / write-actuating tests are excluded by leaving | |
| # their globs off. Expand as we tighten the DUT config. | |
| onvif-tt run \ | |
| --target 127.0.0.1:8080 \ | |
| --user admin --password admin \ | |
| --id-glob 'DEVICE-1-1-2' \ | |
| --id-glob 'DEVICE-1-1-13' \ | |
| --id-glob 'DEVICE-3-1-9' \ | |
| --id-glob 'EVENT-1-1-2' \ | |
| --junit-xml junit.xml \ | |
| --json-report results.json | |
| python -c 'import json; d=json.load(open("results.json")); print("SUMMARY:", d["summary"])' | |
| - name: Upload artefacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: integration-results | |
| path: | | |
| junit.xml | |
| results.json | |
| /tmp/dut/wsd.log | |
| /tmp/dut/lighttpd.err | |
| - name: Tear down DUT | |
| if: always() | |
| run: | | |
| [ -f /tmp/dut/lighttpd.parent.pid ] && kill "$(cat /tmp/dut/lighttpd.parent.pid)" 2>/dev/null || true | |
| [ -f /tmp/dut/wsd.pid ] && kill "$(cat /tmp/dut/wsd.pid)" 2>/dev/null || true |