Lower MIN_VALID_EFFICIENCY to 0.40 #530
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: | |
| push: | |
| branches: ["**"] | |
| pull_request: | |
| branches: ["**"] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Check out | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Install flake8 | |
| run: pip install flake8 | |
| - name: Run flake8 | |
| run: flake8 --ignore=E501,W503,E203 custom_components/cardata | |
| - name: Run ruff linter (auto-fix) | |
| if: github.event_name == 'push' | |
| uses: astral-sh/ruff-action@v3 | |
| with: | |
| args: "check --fix" | |
| src: "custom_components/cardata" | |
| - name: Run ruff linter (check) | |
| if: github.event_name == 'pull_request' | |
| uses: astral-sh/ruff-action@v3 | |
| with: | |
| args: "check" | |
| src: "custom_components/cardata" | |
| - name: Run ruff formatter (auto-fix) | |
| if: github.event_name == 'push' | |
| uses: astral-sh/ruff-action@v3 | |
| with: | |
| args: "format" | |
| src: "custom_components/cardata" | |
| - name: Run ruff formatter check | |
| if: github.event_name == 'pull_request' | |
| uses: astral-sh/ruff-action@v3 | |
| with: | |
| args: "format --check" | |
| src: "custom_components/cardata" | |
| - name: Commit ruff fixes | |
| if: github.event_name == 'push' | |
| uses: stefanzweifel/git-auto-commit-action@v5 | |
| with: | |
| commit_message: "chore: ruff autofix" | |
| typecheck: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Install mypy | |
| run: pip install mypy | |
| - name: Run mypy | |
| run: mypy --namespace-packages --explicit-package-bases --ignore-missing-imports custom_components/cardata | |
| compile: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Compile all | |
| run: python -m compileall custom_components/cardata |