Topology: timemic_tx -> amq.topic MQTT bridge tap #412
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: Tests | |
| on: | |
| - push | |
| - pull_request | |
| jobs: | |
| lint: | |
| name: lint / 3.12 | |
| runs-on: ubuntu-latest | |
| env: | |
| FORCE_COLOR: "1" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| python-version: "3.12" | |
| enable-cache: true | |
| - run: uv sync --all-groups --locked | |
| - name: Ruff lint | |
| run: uv run ruff check . | |
| - name: Ruff format check | |
| run: uv run ruff format --check . | |
| tests: | |
| name: tests / ${{ matrix.python }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python: ["3.12", "3.13"] | |
| env: | |
| FORCE_COLOR: "1" | |
| services: | |
| # Same baked multi-arch image as the dev broker (arm.sh / x86.sh), so CI | |
| # runs against the exact RabbitMQ 4.x + topology developers use. The image | |
| # bakes the conf + generated definitions (vhost d1__1, smqPublic, the | |
| # exchanges/bindings from gwbase.topology), so no config mount is needed. | |
| rabbit: | |
| image: ghcr.io/thegridelectric/dev-rabbit:latest | |
| ports: | |
| - 5672:5672 | |
| - 15672:15672 | |
| - 1885:1885 | |
| options: >- | |
| --health-cmd "rabbitmq-diagnostics -q ping" | |
| --health-interval 5s | |
| --health-timeout 10s | |
| --health-retries 20 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| enable-cache: true | |
| - run: uv sync --all-groups --locked | |
| - name: Run tests | |
| run: uv run coverage run --parallel -m pytest | |
| - name: Coverage report | |
| run: | | |
| uv run coverage combine | |
| uv run coverage report | |
| uv run coverage xml | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: coverage.xml | |
| flags: py${{ matrix.python }} | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: false |