Skip to content

Validate

Validate #483

Workflow file for this run

name: "Validate"
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
push:
branches:
- "main"
workflow_call:
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: # Test and upload to codecov
name: Run tests
runs-on: "ubuntu-latest"
steps:
- name: Check out code from GitHub
uses: "actions/checkout@v4"
- name: Setup Python
uses: "actions/setup-python@v5"
with:
python-version: "3.12"
- name: Install requirements
run: python3 -m pip install -r requirements_dev.txt
- name: Run tests
run: |
pytest \
-qq \
--timeout=9 \
--durations=10 \
-n auto \
--cov custom_components.leakbot \
--cov-report=xml \
-o console_output_style=count \
-p no:sugar \
tests
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: sHedC/homeassistant-leakbot