fix: MQTTTransport Overhaul #107
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: CI | |
| "on": | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.number || github.run_id }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| lint: | |
| name: Ruff | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Check out repository | |
| # v7.0.1 | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python | |
| # v7.0.0 | |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 | |
| with: | |
| python-version: 3.x | |
| - name: Set up uv | |
| # v10.0.1 | |
| uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d | |
| with: | |
| enable-cache: true | |
| cache-suffix: lint-upgrade | |
| - name: Sync lint environment | |
| run: uv sync --upgrade --no-dev --group lint | |
| - name: Run Ruff | |
| run: uv run --no-sync ruff check . | |
| test: | |
| name: Python ${{ matrix.python-version }} | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: | |
| - "3.10" | |
| - "3.11" | |
| - "3.12" | |
| - "3.13" | |
| - "3.14" | |
| steps: | |
| - name: Check out repository | |
| # v7.0.1 | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python ${{ matrix.python-version }} | |
| # v7.0.0 | |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Set up uv | |
| # v10.0.1 | |
| uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d | |
| with: | |
| enable-cache: true | |
| cache-suffix: test-${{ matrix.python-version }}-upgrade | |
| - name: Sync test environment | |
| run: >- | |
| uv sync --upgrade --python "${{ matrix.python-version }}" | |
| --no-dev --group test | |
| - name: Run unit tests | |
| run: >- | |
| uv run --no-sync pytest tests | |
| --junitxml=junit/azure-iot-device-test-results.xml | |
| --cov=azure | |
| --cov-report=xml:coverage.xml | |
| --cov-report=html:coverage | |
| --cov-append | |
| - name: Upload test results and coverage | |
| if: ${{ always() }} | |
| # v7.0.1 | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | |
| with: | |
| name: test-results-python-${{ matrix.python-version }} | |
| path: | | |
| junit/ | |
| coverage.xml | |
| coverage/ | |
| if-no-files-found: error |