Skip to content

Commit

Permalink
ci: check that proto files are in sync with generated files
Browse files Browse the repository at this point in the history
  • Loading branch information
onsails committed Nov 17, 2023
1 parent 6cbd053 commit b666485
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,12 @@ jobs:
with:
input: "proto"

# FIXME: enable after merging
# break-check:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: bufbuild/[email protected]
# - 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"
break-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/[email protected]
- 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"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,4 @@ node_modules
swagger-proto
tmp-swagger-gen
.devenv
.secrets
9 changes: 9 additions & 0 deletions nix/devshell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

packages = with pkgs;
[
act
gh

yarn
nodejs

Expand Down Expand Up @@ -33,8 +35,15 @@
scripts.ci-proto.exec = ''
set -e
make clean
make proto-all
make proto-swagger-gen
# it gets updated every time, so we are ignoring this one
git checkout -- client/docs/statik/statik.go
echo "Checking diff..."
if ! git diff --exit-code; then
echo "Directory is not clean after swagger generation"
exit 1
Expand Down

0 comments on commit b666485

Please sign in to comment.