From d54b4b866c4435683b4eff19f7945f83ef0386af Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 16 Apr 2020 16:31:34 -0700 Subject: [PATCH] Add blog about Hassfest GitHub Action --- blog/2020-04-16-hassfest.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 blog/2020-04-16-hassfest.md diff --git a/blog/2020-04-16-hassfest.md b/blog/2020-04-16-hassfest.md new file mode 100644 index 00000000..50cc2cca --- /dev/null +++ b/blog/2020-04-16-hassfest.md @@ -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.