| # Tests and type checks for the Churn client. | |
| # | |
| # Runs when the client changes, or anything the client is built on: the modules it | |
| # shares with the server, its tests, the dependency list, or this workflow itself. | |
| # A change that only touches the server does not start it (see server.yml for that). | |
| name: Client | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "churn/client/**" | |
| - "churn/__init__.py" | |
| - "churn/config.py" | |
| - "churn/wire.py" | |
| - "tests/client/**" | |
| - "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/client.yml" | |
| pull_request: | |
| paths: | |
| - "churn/client/**" | |
| - "churn/__init__.py" | |
| - "churn/config.py" | |
| - "churn/wire.py" | |
| - "tests/client/**" | |
| - "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/client.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: client-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| tests: | |
| name: Tests | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| # No extras: the client must work without the server's dependencies. | |
| - uses: ./.github/actions/setup | |
| - name: Client tests | |
| run: uv run --no-sync pytest tests/client tests/test_wire.py | |
| # The client's packets are only worth something if the server still reads them. | |
| # This feeds what the client produces into the server's storage code and asks for | |
| # it back through the dashboard's queries. It is the one client job that needs the | |
| # server's dependencies, which is why it is a job of its own. | |
| packets: | |
| name: Server still reads the client's packets | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: ./.github/actions/setup | |
| with: | |
| extras: server | |
| - name: Log line to dashboard query | |
| 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 | |
| - name: mypy | |
| run: uv run --no-sync mypy churn/client churn/config.py churn/wire.py |