Skip to content

Account for phases and OBC efficiency #525

Account for phases and OBC efficiency

Account for phases and OBC efficiency #525

Workflow file for this run

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