Add blog about Hassfest GitHub Action

This commit is contained in:
Paulus Schoutsen 2020-04-16 16:31:34 -07:00
parent 1d6be51f0f
commit d54b4b866c

View File

@ -0,0 +1,37 @@
---
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 intall 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@v2"
- 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.