Release - 2026-04-20 21:00:58 #33
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: Ubuntu PyPNM Integration | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - "main" | |
| - "develop" | |
| pull_request: | |
| branches: | |
| - "main" | |
| - "develop" | |
| permissions: | |
| contents: read | |
| jobs: | |
| integration: | |
| name: Ubuntu ${{ matrix.os }} · Python ${{ matrix.python-version }} · Live CMTS Health | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-22.04 | |
| - ubuntu-24.04 | |
| python-version: | |
| - "3.10" | |
| - "3.11" | |
| - "3.12" | |
| - "3.13" | |
| steps: | |
| - name: Checkout PyPNM-CMTS-WebUI | |
| uses: actions/checkout@v4 | |
| - name: Set Up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: "pip" | |
| cache-dependency-path: | | |
| requirements-docs.txt | |
| - name: Install pypnm-docsis-cmts | |
| run: | | |
| python -m pip install --upgrade pip setuptools wheel | |
| python -m pip install pypnm-docsis-cmts | |
| - name: Start PyPNM-CMTS | |
| run: | | |
| pypnm serve --host 127.0.0.1 --port 8000 > /tmp/pypnm.log 2>&1 & | |
| echo $! > /tmp/pypnm.pid | |
| - name: Wait For CMTS Health | |
| run: | | |
| for attempt in $(seq 1 30); do | |
| if curl -fsS http://127.0.0.1:8000/health; then | |
| exit 0 | |
| fi | |
| sleep 2 | |
| done | |
| echo "PyPNM-CMTS failed to become healthy" | |
| cat /tmp/pypnm.log | |
| exit 1 | |
| - name: Set Up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: "npm" | |
| cache-dependency-path: package-lock.json | |
| - name: Install WebUI Dependencies | |
| run: npm ci | |
| - name: Create CI Env | |
| run: | | |
| cat > .env <<'EOF' | |
| VITE_PYPNM_API_BASE_URL=http://127.0.0.1:8000 | |
| VITE_REQUEST_TIMEOUT_MS=30000 | |
| EOF | |
| - name: Run WebUI Lint | |
| run: npm run lint | |
| - name: Run WebUI Unit Tests | |
| run: npm run test | |
| - name: Run Live PyPNM Health Integration Test | |
| env: | |
| RUN_LIVE_PYPNM_HEALTH: "1" | |
| PYPNM_LIVE_BASE_URL: "http://127.0.0.1:8000" | |
| PYPNM_LIVE_HEALTH_PATH: "/health" | |
| run: npm run test:integration | |
| - name: Run WebUI Build | |
| run: npm run build | |
| - name: Dump Backend Logs On Failure | |
| if: failure() | |
| run: | | |
| cat /tmp/pypnm.log || true | |
| - name: Stop PyPNM-CMTS | |
| if: always() | |
| run: | | |
| if [ -f /tmp/pypnm.pid ]; then | |
| kill "$(cat /tmp/pypnm.pid)" || true | |
| fi |