Skip to content

πŸ“‹ GitHub Action that validates a RotorHazard plugin

License

Notifications You must be signed in to change notification settings

RotorHazard/rhfest-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

57 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

RHFest Action

A reusable GitHub Action that validates manifest.json files for RotorHazard plugins. It checks for missing fields, invalid formats, and unsupported values, and logs validation errors directly in GitHub Actions logs using GitHub-friendly annotations.

πŸ› οΈ Features

  • βœ… Schema validation for manifest.json
  • βœ… Plugin repository structure validation
  • 🚨 GitHub Action annotations for validation errors
  • ⚠️ Warnings for missing optional fields or extra fields
  • πŸ“‹ Validates for example:
    • domain format (e.g., lowercase letters, numbers, underscores)
    • codeowners GitHub handle (@username)
    • documentation URL format
    • dependencies in package==X.Y.Z format

πŸš€ How to Use

Create a file .github/workflows/validate.yml in your plugin repository with the following content:

name: Validate Plugin Manifest

on:
  push:
  pull_request:

jobs:
  validate:
    name: Run RHFest validation
    runs-on: ubuntu-latest
    steps:
      - name: Check out repository
        uses: actions/checkout@v4

      - name: Run RHFest validation
        uses: docker://ghcr.io/rotorhazard/rhfest-action:v1

Local testing

To run RHFest image locally on your plugin repository, use the following command:

docker run --rm -v "$(pwd)":/app ghcr.io/rotorhazard/rhfest-action:latest

Development

How to setup the development environment.

Prerequisites

You need the following tools to get started:

  • uv - A python virtual environment/package manager
  • Python 3.13 - The programming language

Installation

  1. Clone the repository
  2. Install all dependencies with UV. This will create a virtual environment and install all dependencies
uv sync
  1. Setup the pre-commit check, you must run this inside the virtual environment
uv run pre-commit install
  1. Run the application
uv run python rhfest/core.py

Run pre-commit checks

As this repository uses the pre-commit framework, all changes are linted and tested with each commit. You can run all checks and tests manually, using the following command:

uv run pre-commit run --all-files

To manual run only on the staged files, use the following command:

uv run pre-commit run

🌟 Credits

This project was inspired by:

License

Distributed under the MIT License. See LICENSE for more information.