Skip to content

alert-mcp: fix CO-OPS response parsing, error handling, and product allowlist #199

alert-mcp: fix CO-OPS response parsing, error handling, and product allowlist

alert-mcp: fix CO-OPS response parsing, error handling, and product allowlist #199

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
adcirc-mcp: ${{ steps.filter.outputs.adcirc-mcp }}
coops-mcp: ${{ steps.filter.outputs.coops-mcp }}
erddap-mcp: ${{ steps.filter.outputs.erddap-mcp }}
goes-mcp: ${{ steps.filter.outputs.goes-mcp }}
nhc-mcp: ${{ steps.filter.outputs.nhc-mcp }}
ofs-mcp: ${{ steps.filter.outputs.ofs-mcp }}
recon-mcp: ${{ steps.filter.outputs.recon-mcp }}
schism-mcp: ${{ steps.filter.outputs.schism-mcp }}
stofs-mcp: ${{ steps.filter.outputs.stofs-mcp }}
usgs-mcp: ${{ steps.filter.outputs.usgs-mcp }}
winds-mcp: ${{ steps.filter.outputs.winds-mcp }}
ww3-mcp: ${{ steps.filter.outputs.ww3-mcp }}
rtofs-mcp: ${{ steps.filter.outputs.rtofs-mcp }}
ndbc-mcp: ${{ steps.filter.outputs.ndbc-mcp }}
alert-mcp: ${{ steps.filter.outputs.alert-mcp }}
hpc-system-mcp: ${{ steps.filter.outputs.hpc-system-mcp }}
ufs-runner-mcp: ${{ steps.filter.outputs.ufs-runner-mcp }}
vdatum-mcp: ${{ steps.filter.outputs.vdatum-mcp }}
steps:
- uses: actions/checkout@v6
- uses: dorny/paths-filter@v4
id: filter
with:
filters: |
adcirc-mcp:
- 'servers/adcirc-mcp/**'
coops-mcp:
- 'servers/coops-mcp/**'
erddap-mcp:
- 'servers/erddap-mcp/**'
goes-mcp:
- 'servers/goes-mcp/**'
nhc-mcp:
- 'servers/nhc-mcp/**'
ofs-mcp:
- 'servers/ofs-mcp/**'
recon-mcp:
- 'servers/recon-mcp/**'
schism-mcp:
- 'servers/schism-mcp/**'
stofs-mcp:
- 'servers/stofs-mcp/**'
usgs-mcp:
- 'servers/usgs-mcp/**'
winds-mcp:
- 'servers/winds-mcp/**'
ww3-mcp:
- 'servers/ww3-mcp/**'
rtofs-mcp:
- 'servers/rtofs-mcp/**'
ndbc-mcp:
- 'servers/ndbc-mcp/**'
alert-mcp:
- 'servers/alert-mcp/**'
hpc-system-mcp:
- 'servers/hpc-system-mcp/**'
ufs-runner-mcp:
- 'servers/ufs-runner-mcp/**'
vdatum-mcp:
- 'servers/vdatum-mcp/**'
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
# Pinned: an unpinned ruff reddened main when 0.16.0 started formatting
# markdown code fences. Keep in sync with servers/recon-mcp/pyproject.toml.
- run: uv tool install ruff==0.15.2
- name: Ruff check
run: ruff check servers/ --select E,F,W --ignore E501
- name: Ruff format check
run: ruff format --check servers/
test:
needs: detect-changes
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
server: [adcirc-mcp, alert-mcp, coops-mcp, erddap-mcp, goes-mcp, hpc-system-mcp, ndbc-mcp, nhc-mcp, ofs-mcp, recon-mcp, rtofs-mcp, schism-mcp, stofs-mcp, ufs-runner-mcp, usgs-mcp, vdatum-mcp, winds-mcp, ww3-mcp]
# On PRs, skip unchanged servers. On push to main, run all. Gate on
# detect-changes actually succeeding (rather than `always()`): if it fails,
# needs.detect-changes.outputs[matrix.server] is empty, every step below is
# skipped (they're all gated on should-run == 'true'), and the job would
# otherwise report a false SUCCESS having run nothing.
if: ${{ !cancelled() && (github.event_name == 'push' || needs.detect-changes.result == 'success') }}
steps:
- name: Check if server changed
id: should-run
run: |
if [[ "${{ github.event_name }}" == "push" ]]; then
echo "run=true" >> "$GITHUB_OUTPUT"
else
echo "run=${{ needs.detect-changes.outputs[matrix.server] }}" >> "$GITHUB_OUTPUT"
fi
- uses: actions/checkout@v6
if: steps.should-run.outputs.run == 'true'
- uses: astral-sh/setup-uv@v7
if: steps.should-run.outputs.run == 'true'
with:
enable-cache: true
cache-dependency-glob: "servers/${{ matrix.server }}/uv.lock"
- uses: actions/setup-python@v6
if: steps.should-run.outputs.run == 'true'
with:
python-version: "3.12"
- name: Install dependencies
if: steps.should-run.outputs.run == 'true'
working-directory: servers/${{ matrix.server }}
run: uv sync --group dev
- name: Run unit + MCP protocol tests
if: steps.should-run.outputs.run == 'true'
working-directory: servers/${{ matrix.server }}
run: uv run pytest tests/ --ignore=tests/test_live.py -v --tb=short
- name: Verify package builds
if: steps.should-run.outputs.run == 'true'
working-directory: servers/${{ matrix.server }}
run: uv build