name: Push actions

on:
  push:
    branches:
      - master
      - dev

jobs:
  validate:
    runs-on: "ubuntu-latest"
    name: Validate
    steps:
        - uses: "actions/checkout@v2"

        - name: HACS validation
          uses: "hacs/action@main"
          with:
            category: "integration"
            ignore: brands

        - name: Hassfest validation
          uses: "home-assistant/actions/hassfest@master"

  style:
    runs-on: "ubuntu-latest"
    name: Check style formatting
    steps:
        - uses: "actions/checkout@v2"
        - uses: "actions/setup-python@v1"
          with:
            python-version: "3.x"
        - run: python3 -m pip install black
        - run: black .
