developers.home-assistant/blog/2020-04-16-hassfest.md

38 lines
1.3 KiB
Markdown

---
author: Paulus Schoutsen
authorURL: https://twitter.com/balloob
authorImageURL: /img/profile/paulus.jpg
authorTwitter: balloob
title: Hassfest for custom components
---
Hassfest is an internal tool that we use in Home Assistant to make sure that all integrations have valid data. We've now made Hassfest able to validate any integration, including custom integrations. To make it easy to get started with this, [@ludeeus](https://www.github.com/ludeeus) has created a GitHub Action that gets you up and running in less than a minute.
To install it, follow these steps:
1. Go to your custom component repository on GitHub
2. Click on "Create new file"
3. For filename, paste `.github/workflows/hassfest.yaml`
4. Paste the following contents:
```yaml
name: Validate with hassfest
on:
push:
pull_request:
schedule:
- cron: "0 0 * * *"
jobs:
validate:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- uses: home-assistant/actions/hassfest@master
```
GitHub will now lint all incoming PRs and commits with hassfest, and will also run it once every night to check against the latest requirements.
The Hassfest action will track the beta release channel. That way you will be notified if your integration is incompatible with newer versions of Home Assistant.