Verify workflow template

← Getting started

Save this as .github/workflows/nova-verify.yml in any repository where you want Nova's "Verify" button to do something real. The workflow_dispatch inputs are intentionally generic so most projects can wire it up without edits.

name: Nova Verify

on:
  workflow_dispatch:
    inputs:
      ref:
        description: "Branch or SHA Nova is verifying"
        required: false
        type: string
      pr_number:
        description: "Optional PR to associate the run with"
        required: false
        type: string

jobs:
  verify:
    runs-on: ubuntu-latest
    timeout-minutes: 15
    steps:
      - uses: actions/checkout@v4
        with:
          ref: ${{ inputs.ref || github.ref }}

      # --- pick the toolchain blocks that apply to your repo. ----------

      - name: Setup Node
        if: hashFiles('package.json') != ''
        uses: actions/setup-node@v4
        with:
          node-version: "20"
          cache: ${{ hashFiles('package-lock.json') != '' && 'npm' || (hashFiles('pnpm-lock.yaml') != '' && 'pnpm' || (hashFiles('yarn.lock') != '' && 'yarn' || '')) }}

      - name: Install (npm)
        if: hashFiles('package-lock.json') != ''
        run: npm ci

      - name: Lint
        if: hashFiles('package.json') != ''
        run: |
          if jq -e '.scripts.lint' package.json >/dev/null 2>&1; then npm run -s lint; else echo "no lint script"; fi

      - name: Test
        if: hashFiles('package.json') != ''
        run: |
          if jq -e '.scripts.test' package.json >/dev/null 2>&1; then npm test -- --reporter=basic --run; else echo "no test script"; fi

      - name: Build
        if: hashFiles('package.json') != ''
        run: |
          if jq -e '.scripts.build' package.json >/dev/null 2>&1; then npm run -s build; else echo "no build script"; fi

How Nova talks to this workflow

1. User clicks **Verify** in Nova on a thread tied to a specific branch. 2. Nova POSTs /api/nova/vibe/verify → server dispatches this workflow with inputs.ref = <branch> using the user's stored GitHub OAuth token. The PAT must include the workflow scope. 3. Nova writes a nova_verification_runs row with status = pending. 4. Nova polls /repos/{owner}/{repo}/actions/workflows/nova-verify.yml/runs to resolve the run id, then GET .../runs/{id} to track conclusion. 5. The Verify UI in the thread updates from pending → queued → in_progress → success or failure, with a link to the GitHub Actions run.

Customizing

- Add language-specific blocks (Python pytest, Go go test ./..., Rust cargo test, Java mvn verify, etc.) — anything that exits non-zero on failure works. - If your project already has a ci.yml, you can keep this workflow thin and just call it: run: gh workflow run ci.yml --ref ${{ inputs.ref }} && gh run watch. - Branch protection: this workflow only reads — it never pushes — so it's safe to point at main or any protected branch.