name: validate

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  validate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install nono
        run: |
          brew tap guybedford/nono
          brew install nono

      - name: Validate profile
        run: nono profile validate opencode-tinfoil

      - name: Set up Go
        uses: actions/setup-go@v5
        with:
          go-version: '1.22'

      - name: Build TUI
        run: cd tui && go build -buildvcs=false ./...