name: Docgen and go fmt

on:
  workflow_dispatch:
  push:
    branches: ['master']
  pull_request:

jobs:
  docgen:
    name: Verify Docgen
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
      - uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c
      - run: ./scripts/verify-docs.sh
  fmt:
    name: Verify go fmt
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
      - uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c
      - run: test -z $(go fmt ./...)
