Skip to content

GitHub Action

eigenhelm is available as a GitHub Action for CI integration.

Basic usage

- uses: metacogdev/eigenhelm@v0.3
  with:
    paths: "src/"

PR diff mode

Evaluate only files changed in a pull request:

name: Code Quality
on: [pull_request]

jobs:
  eigenhelm:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - uses: metacogdev/eigenhelm@v0.3
        with:
          diff: origin/main...HEAD

Strict mode

Fail the check if any file scores marginal or worse:

- uses: metacogdev/eigenhelm@v0.3
  with:
    diff: origin/main...HEAD
    strict: "true"

SARIF upload

Send results to GitHub Code Scanning:

- uses: metacogdev/eigenhelm@v0.3
  with:
    diff: origin/main...HEAD
    sarif-upload: "true"

All inputs

Input Default Description
paths "." Files or directories to evaluate
model (bundled) Path to .npz model file
diff (none) Git revision range for changed files only
format "human" Output format: human, json, sarif
classify "true" Show accept/marginal/reject labels
strict "false" Treat marginal as reject
lenient "false" Treat marginal as accept
version (latest) eigenhelm version to install
sarif-upload "false" Upload SARIF to GitHub Code Scanning

Outputs

Output Description
sarif-file Path to SARIF file (when applicable)
exit-code Exit code from evaluation