From 7e47aa4c7e143be45a03fb5ae95e81937b882183 Mon Sep 17 00:00:00 2001 From: Thane Thomson Date: Wed, 23 Feb 2022 18:02:46 -0500 Subject: [PATCH] Adopt Cosmos SDK's approach to Protobuf linting and breakage checking in CI Signed-off-by: Thane Thomson --- .github/workflows/proto-check.yml | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/.github/workflows/proto-check.yml b/.github/workflows/proto-check.yml index 306e62903..ff74583c1 100644 --- a/.github/workflows/proto-check.yml +++ b/.github/workflows/proto-check.yml @@ -6,19 +6,25 @@ on: workflow_dispatch: # allow running workflow manually pull_request: paths: - - "proto/*" + - "proto/**" + jobs: - proto-lint: + lint: runs-on: ubuntu-latest - timeout-minutes: 4 + timeout-minutes: 5 steps: - - uses: actions/checkout@v2.4.0 - - name: lint - run: make proto-lint - proto-breakage: + - uses: actions/checkout@v2 + - uses: bufbuild/buf-setup-action@v1.0.0 + - uses: bufbuild/buf-lint-action@v1 + with: + input: 'proto' + + break-check: runs-on: ubuntu-latest - timeout-minutes: 4 steps: - - uses: actions/checkout@v2.4.0 - - name: check-breakage - run: make proto-check-breaking-ci + - uses: actions/checkout@v2 + - uses: bufbuild/buf-setup-action@v1.0.0 + - uses: bufbuild/buf-breaking-action@v1 + with: + input: 'proto' + against: 'https://github.com/${{ github.repository }}.git#branch=${{ github.event.pull_request.base.ref }},ref=HEAD~1,subdir=proto'