Skip to content
Latchkey

Validate workflow (jseidl/magic-areas)

The Validate workflow from jseidl/magic-areas, explained and optimized by Latchkey.

C

CI health: C - fair

Run this on Latchkey for self-healing, caching, and up to 58% lower cost.

Grade your own workflow free or run it on Latchkey →
Source: jseidl/magic-areas.github/workflows/validation.yamlLicense MITView source

What it does

This is the Validate workflow from the jseidl/magic-areas repository, a real project running GitHub Actions. It is shown here with attribution under its MIT license.

Below, Latchkey shows a faster, safer version produced by its optimization engine.

The workflow

workflow (.yml)
name: "Validate"

on:
  workflow_dispatch:
  schedule:
    - cron:  "0 0 * * *"
  push:
    branches:
      - "main"
  pull_request:
    branches:
      - "main"

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/checkout@v6"

        - 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/checkout@v6"

        - name: "Run HACS validation"
          uses: "hacs/action@main"
          with:
            github_token: ${{ secrets.GITHUB_TOKEN }}
            category: integration

The same workflow, on Latchkey

Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.

name: "Validate"
 
on:
  workflow_dispatch:
  schedule:
    - cron:  "0 0 * * *"
  push:
    branches:
      - "main"
  pull_request:
    branches:
      - "main"
 
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
 
jobs:
  hassfest: # https://developers.home-assistant.io/blog/2020/04/16/hassfest
    timeout-minutes: 30
    name: "Hassfest Validation"
    runs-on: "ubuntu-latest"
    steps:
        - name: "Checkout the repository"
          uses: "actions/checkout@v6"
 
        - name: "Run hassfest validation"
          uses: "home-assistant/actions/hassfest@master"
 
  hacs: # https://github.com/hacs/action
    timeout-minutes: 30
    name: "HACS Validation"
    runs-on: "ubuntu-latest"
    steps:
        - name: "Checkout the repository"
          uses: "actions/checkout@v6"
 
        - name: "Run HACS validation"
          uses: "hacs/action@main"
          with:
            github_token: ${{ secrets.GITHUB_TOKEN }}
            category: integration
 

What changed

This workflow runs 2 jobs per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.