| # Tests and type checks for the Churn server, dashboard files included. | |
| # | |
| # Runs when the server changes, or anything the server is built on: the modules it | |
| # shares with the client, its tests, the dependency list, or this workflow itself. | |
| # A change that only touches the client does not start it (see client.yml for that). | |
| name: Server | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "churn/server/**" | |
| - "churn/__init__.py" | |
| - "churn/config.py" | |
| - "churn/wire.py" | |
| - "tests/server/**" | |
| - "tests/__init__.py" | |
| - "tests/conftest.py" | |
| - "tests/browsers.py" | |
| - "tests/test_wire.py" | |
| - "tests/test_pipeline.py" | |
| - "pyproject.toml" | |
| - "uv.lock" | |
| - ".python-version" | |
| - ".github/actions/setup/**" | |
| - ".github/workflows/server.yml" | |
| pull_request: | |
| paths: | |
| - "churn/server/**" | |
| - "churn/__init__.py" | |
| - "churn/config.py" | |
| - "churn/wire.py" | |
| - "tests/server/**" | |
| - "tests/__init__.py" | |
| - "tests/conftest.py" | |
| - "tests/browsers.py" | |
| - "tests/test_wire.py" | |
| - "tests/test_pipeline.py" | |
| - "pyproject.toml" | |
| - "uv.lock" | |
| - ".python-version" | |
| - ".github/actions/setup/**" | |
| - ".github/workflows/server.yml" | |
| workflow_dispatch: | |
| # The jobs only read the repository. | |
| permissions: | |
| contents: read | |
| # A newer push to the same branch or pull request replaces a run still in progress. | |
| concurrency: | |
| group: server-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| tests: | |
| name: Tests | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: ./.github/actions/setup | |
| with: | |
| extras: server | |
| - name: Server tests | |
| run: uv run --no-sync pytest tests/server tests/test_wire.py | |
| # The path from a log line through the client's tally into the server's | |
| # storage and back out through the dashboard's queries. | |
| - name: Client and server still agree on the packet format | |
| run: uv run --no-sync pytest tests/test_pipeline.py | |
| types: | |
| name: Type checks | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: ./.github/actions/setup | |
| with: | |
| extras: server | |
| - name: mypy | |
| run: uv run --no-sync mypy churn/server churn/config.py churn/wire.py |