Repository navigation
Bump pyproject-fmt from 2.10.0 to 2.11.0 #414
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: CI | |
| on: | |
| release: | |
| types: | |
| - published | |
| push: | |
| paths: | |
| - "uv.lock" | |
| - "pyproject.toml" | |
| - "src/**" | |
| - "hass-addon-sunsynk-multi/**" | |
| - "hass-addon-sunsynk-edge/**" | |
| - ".github/workflows/deploy-sunsynk.yml" | |
| - ".github/workflows/ci.yml" | |
| pull_request: | |
| paths: | |
| - "uv.lock" | |
| - "pyproject.toml" | |
| - "src/**" | |
| - "hass-addon-sunsynk-multi/**" | |
| - "hass-addon-sunsynk-edge/**" | |
| - ".github/workflows/deploy-sunsynk.yml" | |
| - ".github/workflows/ci.yml" | |
| env: | |
| RUFF_VERSION: 0.13.1 | |
| UV_VERSION: 0.8.19 | |
| jobs: | |
| ruff: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: chartboost/ruff-action@v1 | |
| with: | |
| version: ${{ env.RUFF_VERSION }} | |
| - uses: chartboost/ruff-action@v1 | |
| with: | |
| args: "format --check" | |
| version: ${{ env.RUFF_VERSION }} | |
| mypy: | |
| name: Check mypy | |
| needs: [ruff] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: "Set up Python" | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version-file: "pyproject.toml" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: ${{ env.UV_VERSION }} | |
| - name: Install Requirements | |
| run: uv sync --frozen --all-extras | |
| - name: Run mypy | |
| run: uv run mypy . --config-file pyproject.toml | |
| pytest: | |
| name: Run tests Python ${{ matrix.python-version }} | |
| needs: [ruff] | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.12", "3.13", "3.14"] | |
| env: | |
| PYTHON: ${{ matrix.python-version }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: "Set up Python" | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: ${{ env.UV_VERSION }} | |
| - name: Install Requirements | |
| run: uv sync --frozen --all-extras | |
| - name: Run tests and generate coverage report | |
| run: uv run pytest | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| env_vars: PYTHON | |
| verbose: true | |
| build-n-publish: | |
| name: Build and publish Python 🐍 distributions 📦 to PyPI | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags') | |
| needs: | |
| - pytest | |
| permissions: | |
| id-token: write # used for trusted publishing | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: "Set up Python" | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version-file: "pyproject.toml" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: ${{ env.UV_VERSION }} | |
| - name: Build a binary wheel and a source tarball | |
| run: uv build | |
| - name: Publish distribution 📦 to PyPI | |
| run: uv publish |