Skip to content

ci: Enable the brands check #49

ci: Enable the brands check

ci: Enable the brands check #49

Workflow file for this run

name: "CI"
on:
workflow_dispatch:
push:
branches:
- "main"
pull_request:
branches:
- "main"
env:
DEFAULT_PYTHON: "3.12"
jobs:
hassfest: # https://developers.home-assistant.io/blog/2020/04/16/hassfest
name: "Hassfest Validation"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout the repository"
uses: "actions/[email protected]"
- name: "Run hassfest validation"
uses: "home-assistant/actions/hassfest@master"
hacs: # https://github.com/hacs/action
name: "HACS Validation"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout the repository"
uses: "actions/[email protected]"
- name: "Run HACS validation"
uses: "hacs/action@main"
with:
category: "integration"
tests:
runs-on: "ubuntu-latest"
name: 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: Set up poetry
uses: snok/[email protected]
- name: "Set up dependencies"
run: poetry install --no-interaction
- name: Tests suite
run: |
poetry run pytest -p no:sugar
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: OS,PYTHON
verbose: true
lint:
runs-on: "ubuntu-latest"
name: Lint
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: Set up poetry
uses: snok/[email protected]
- name: "Set up dependencies"
run: poetry install --no-interaction
- name: "Lint"
run: poetry run ruff check .
- name: "Format"
run: poetry run ruff format . --check
mypy:
runs-on: "ubuntu-latest"
name: Typing
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: Set up poetry
uses: snok/[email protected]
- name: "Set up dependencies"
run: poetry install --no-interaction
- name: "mypy"
run: poetry run mypy -p custom_components.hass_web_proxy