Return LightEntityFeature(0) zero value in supported_features when there are no effects #640
This file contains 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: Linting | |
on: | |
pull_request: | |
types: | |
- opened | |
- edited | |
- synchronize | |
branches: | |
- main | |
- next | |
env: | |
DEFAULT_PYTHON: 3.11 | |
permissions: | |
pull-requests: write | |
statuses: write | |
jobs: | |
validate-pr-title: | |
name: Validate PR title | |
runs-on: ubuntu-latest | |
steps: | |
- uses: amannn/action-semantic-pull-request@v5 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
types: | | |
docs | |
refactor | |
chore | |
fix | |
feat | |
breaking | |
scopes: | | |
ci | |
core | |
requireScope: true | |
ignoreLabels: | | |
bot | |
subjectPattern: ^.+$ | |
subjectPatternError: | | |
The subject "{subject}" found in the pull request title "{title}" | |
didn't match the configured pattern. Please ensure that the subject | |
doesn't start with an uppercase character. | |
wip: true | |
pre-commit: | |
runs-on: "ubuntu-latest" | |
name: Pre-commit | |
steps: | |
- name: Check out the repository | |
uses: actions/[email protected] | |
- name: Set up Python ${{ env.DEFAULT_PYTHON }} | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ env.DEFAULT_PYTHON }} | |
- name: Upgrade pip | |
run: | | |
pip install --constraint=.github/workflows/constraints.txt pip | |
pip --version | |
- name: Install Python modules | |
run: | | |
pip install --constraint=.github/workflows/constraints.txt pre-commit black flake8 reorder-python-imports autoflake | |
- name: Run pre-commit on all files | |
run: | | |
pre-commit run --files custom_components/* --show-diff-on-failure --color=always | |
hacs: | |
runs-on: "ubuntu-latest" | |
name: HACS Validation | |
steps: | |
- name: Check out the repository | |
uses: "actions/[email protected]" | |
- name: HACS validation | |
uses: "hacs/[email protected]" | |
with: | |
category: "integration" | |
tests: | |
runs-on: "ubuntu-latest" | |
name: Run tests | |
steps: | |
- name: Check out code from GitHub | |
uses: actions/[email protected] | |
- name: Setup Python ${{ env.DEFAULT_PYTHON }} | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ env.DEFAULT_PYTHON }} | |
- name: Install requirements | |
run: | | |
pip install --constraint=.github/workflows/constraints.txt pip | |
pip install -r requirements_test.txt | |
- name: Unit tests suite | |
run: | | |
pytest \ | |
--timeout=9 \ | |
--durations=10 \ | |
--cov-fail-under=40 \ | |
--junitxml=pytest.xml \ | |
--cov-report=term-missing:skip-covered \ | |
--cov=app \ | |
-p no:sugar \ | |
tests/ | tee pytest-coverage.txt | |
- name: Pytest coverage comment | |
uses: MishaKav/pytest-coverage-comment@main | |
with: | |
pytest-coverage-path: ./pytest-coverage.txt | |
junitxml-path: ./pytest.xml |