Skip to content

Linting and Testing #1815

Linting and Testing

Linting and Testing #1815

Workflow file for this run

name: "Linting and Testing"
on:
push:
branches:
- main
- master
- dev
pull_request:
schedule:
- cron: "0 0 * * *"
jobs:
pre-commit:
runs-on: "ubuntu-latest"
name: Pre-commit
steps:
- name: Check out the repository
uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: pyproject.toml
cache: "poetry"
- name: Install Python modules
run: |
poetry install --no-root
- name: Run pre-commit on all files
run: |
poetry run pre-commit run --all-files --show-diff-on-failure --color=always
hacs:
runs-on: "ubuntu-latest"
name: HACS
steps:
- name: Check out the repository
uses: "actions/checkout@v4"
- name: HACS validation
uses: "hacs/action@22.5.0"
with:
category: "integration"
hassfest:
runs-on: "ubuntu-latest"
name: Hassfest
steps:
- name: Check out the repository
uses: "actions/checkout@v4"
- name: Hassfest validation
uses: "home-assistant/actions/hassfest@master"
test:
runs-on: "ubuntu-latest"
name: "Test"
steps:
- name: Check out the repository
uses: "actions/checkout@v4"
- name: Install poetry
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: pyproject.toml
cache: "poetry"
- name: Install Python modules
run: |
poetry install --no-root
- name: Run pytest
uses: pavelzw/pytest-action@v2
with:
custom-pytest: "poetry run pytest"
verbose: true
emoji: true
job-summary: true
click-to-expand: false