openfga / api

Protocol Buffers used by OpenFGA
Apache License 2.0
19 stars 14 forks source link

Add buf format validation to CI #35

Closed craigpastro closed 2 years ago

craigpastro commented 2 years ago

In .github/workflows/pull_request.yaml something like the following should work:

name: Pull Request

on:
  pull_request:
    branches:
      - main

jobs:
  buf-fmt:
    runs-on: ubuntu-latest
    timeout-minutes: 5
    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - uses: bufbuild/buf-setup-action@v1
        with:
          version: '1.4.0'

      - run: buf format -d --exit-code