feat(app): FastAPI routes for the dispatcher + wire codec #16
Workflow file for this run
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: Python checks | |
| on: | |
| pull_request: | |
| push: | |
| branches: [master] | |
| jobs: | |
| lint: | |
| name: Lint (ruff) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install ruff | |
| run: pip install ruff | |
| - name: Run ruff | |
| run: ruff check . || echo "::warning::ruff found issues — please fix before merging" | |
| continue-on-error: true | |
| python-import: | |
| name: Import smoke test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: | | |
| pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Verify modules import | |
| run: | | |
| python -c "import server" || true | |
| python -c "import utils" | |
| python -c "from resource.collections import Create, Retrieve" | |
| python -c "from resource.moving_features import Create, Retrieve" | |
| python -c "from resource.temporal_geom_query import distance, velocity, acceleration" | |
| pytest-dispatcher: | |
| name: Dispatcher / resolvers / wire / app unit tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| # `fastapi` + `httpx` are required by test_app.py; the other test | |
| # modules run with pytest alone since the package init lazy-loads | |
| # FastAPI via PEP 562. | |
| run: pip install --upgrade pip pytest fastapi 'httpx>=0.24' | |
| - name: Run framework + app tests | |
| run: python -m pytest tests/test_dispatcher.py tests/test_resolvers.py tests/test_wire.py tests/test_app.py -v |